# XML Patterns — Flow Approval Process
Complete XML reference for all components of a Flow Approval Process.
---
## Orchestration — Required Input Variables
```xml
recordIdStringtruesubmitterStringtruesubmissionCommentsStringtruefirstApproverStringtrue
```
---
## WebLink — Only Valid Trigger
```xml
LaunchApprovalonlinebuttonurlreplacefalse/flow/MyOrchestration?recordId={!Object__c.Id}&submitter={!$User.Id}&retURL=/{!Object__c.Id}
```
Add to the page layout as `actionType: CustomButton`.
**Do not include** `hasMenubar`, `hasScrollbars`, `height`, `position`, `isResizable` — these are forbidden with `openType: replace` and cause deployment failures.
---
## Background Step
Calls an AutoLaunched flow. Use for calculations, evaluations, and status updates.
```xml
CalcLevelMyAutoLaunchedFlowstepBackgroundBackgroundSteprecordIdrecordIdapprovalLevelfalsefalsefalse
```
**Input constraints:** only variable references (``) or string literals (`1`) are valid. Expressions and merge fields are not supported.
---
## Approval Step
Calls a Screen Flow for the approver UI.
```xml
Approval_N1Review_Approval_Screen_FlowstepApprovalApprovalStepMyQueueDeveloperNameQueueapprovalDecisiontruetruetrue
```
---
## Decision Element — Routing After Background Step
Reference Background Step outputs using the `Outputs.` prefix:
```xml
RouteByLevelLevel1andCalcLevel.Outputs.approvalLevelEqualTo1Stage_N1
```
Decision after an Approval Step — check the `approvalDecision` output:
```xml
Approval_N1.Outputs.approvalDecision
```
---
## Screen Flow — Required Variables
The approver Screen Flow must expose these variables with the exact names shown.
```xml
approvalInformationStringtruerecordIdStringtrueapprovalDecisionStringtrueApprovalRadioButtonsapprovalCommentsStringtrue
```
Add a `faultConnector` on every `recordLookups` element leading to a screen that displays `{!$Flow.FaultMessage}`.
---
## Orchestrated Stage — Full Structure
```xml
Stage_N1andApproval_N1Review_Approval_Screen_FlowstepApprovalApprovalStepMyQueueQueueapprovalDecisiontruetruetrueUpdateStatus_N1UpdateApprovalStatusFlowstepBackgroundBackgroundSteprecordIdrecordIdstatusPendingN2falsefalsefalseRouteAfterN1
```