# How do Screen Flows empower support agents to execute guided troubleshooting workflows?

**Topic:** Service Cloud · **Difficulty:** Medium · **Tags:** Service Cloud, Screen Flows, Guided Troubleshooting

Read it on the site: https://www.forcechallenges.com/interview-questions/how-do-screen-flows-empower-support-agents-to-execute-guided-troubleshooting-workflows

## Answer

**Basics:** A Screen Flow is a Flow Builder flow that includes Screen elements with UI components (inputs, choices, data tables, display text). Support teams model a troubleshooting tree: ask symptom, branch on answer, show the next instruction, then create a work order, update the case or send an email. It standardizes handling, reduces training time and captures structured data on the case.

**How it works:** Build in Setup > Flows > New Flow > Screen Flow. Declare an input variable named `recordId` (Text, available for input) so the flow receives the current case. Use Get Records to load data, Screen elements for questions, Decision elements to branch, and Create/Update Records or Actions to act. Surface it to agents via: the Flow component on a Lightning record page, a Flow quick action, a Flow utility item, or a custom button. Activate the flow version; only active versions run for users.

**Advanced / deep dive:** Reactive screens update components live as values change, and conditional visibility shows only relevant fields. Dynamic choices and the Lookup component pull picklists and records. For logic that Flow cannot express, call an invocable Apex action or a custom screen LWC. Screen flows run in user context by default, honoring object, field and sharing access, but the Run setting can be changed to system context (with or without sharing), so choose deliberately. Transactions: a flow transaction ends at each screen, so records written before a screen are already committed if the user abandons or errors later. Use the Roll Back Records element only within one transaction. Flow Orchestration is for multi-user, multi-step processes, not for a single agent's guided script. Embed flows in your own LWC with `lightning-flow`.

**Code / config example:**
```html
<!-- caseFlowHost.html -->
<template>
  <lightning-flow flow-api-name="Troubleshoot_Network_Issue"
                  flow-input-variables={inputVars}
                  onstatuschange={handleStatus}></lightning-flow>
</template>
```
```javascript
// caseFlowHost.js
import { LightningElement, api } from 'lwc';
export default class CaseFlowHost extends LightningElement {
  @api recordId;
  get inputVars() { return [{ name: 'recordId', type: 'String', value: this.recordId }]; }
  handleStatus(e) { if (e.detail.status === 'FINISHED') { /* refresh or toast */ } }
}
```

**Hidden gotchas & must-remember points:**
- Users need the Run Flows permission (or equivalent flow access) or the flow will not launch.
- DML before a screen is committed; an abandoned flow leaves partial data.
- Apex-style limits (100 SOQL, 150 DML) apply per transaction; Get Records inside loops hits them.
- Only active versions run; editing without activating changes nothing for agents.
- Workflow Rules and Process Builder are retired; Flow is the only supported declarative automation.
- Save paused interviews carefully: paused screen flows can be resumed but need interview-pause settings enabled.

**Best practice:** Keep each flow focused on one task, name elements clearly, add fault paths, and surface the flow in context on the case page.

---
Source: ForceChallenges · last updated 2026-11-02
