Account post-upsert flow
Note
This flow is self-documenting and should be viewed within Salesforce (Setup > Process Automations > Flows). This document is to support working through a visual flow. Please note: the flow commentary is produced using AI.
Overview#
Flow name: MoveData_Donation_Account_Post Label: [MoveData] General: Account - Post Upsert Type: Auto-Launched Flow Template API version: 60.0 Status: Active
This flow handles post-processing operations after account records are created or updated, focusing specifically on platform key association with configuration controls and error handling.
Purpose#
The flow performs post-upsert operations that:
- Creates platform key associations linking accounts to external platform identifiers
- Provides configuration controls to disable platform key creation when needed
- Implements error handling for platform key creation failures
Salesforce fields#
This flow interacts with the Salesforce Account object and its related fields. Below is a mapping of all fields utilised:
| Field API name | Field type | Purpose in flow |
|---|---|---|
| Id | ID | Unique record identifier |
Input variables#
Core account data#
| Variable | Type | Required | Description |
|---|---|---|---|
Record |
Account SObject | Yes | The Account record that was created/updated |
Platform |
String | Yes | External platform identifier |
PlatformKey |
String | Yes | External platform's account identifier |
Config_AccountDisablePlatformKey |
Boolean | No | Configuration flag to disable platform key creation |
Output variables#
| Variable | Type | Description |
|---|---|---|
Errors |
String Collection | Error messages from platform key creation |
Flow logic#
1. Platform key configuration check#
The flow first evaluates whether platform key creation is enabled:
- If Config_AccountDisablePlatformKey is true: Skips all platform key processing
- If Config_AccountDisablePlatformKey is false: Proceeds to platform key validation
2. Platform key validation#
The flow checks if platform key data is available:
- If Platform and PlatformKey are provided: Proceeds to platform key creation
- If either Platform or PlatformKey is missing: Flow terminates without creating platform key
3. Platform key creation#
When validation passes, the flow creates the platform key association:
- Component: Uses
movedata__PlatformKeyCreateComponentApex action - Validation: Includes
ErrorIfDifferentObjectIdto prevent key conflicts - Error handling: Captures any creation errors in the Errors collection
- Association: Links the platform key to the account record
Processing summary#
- Configuration check: Evaluate if platform key creation is disabled
- Platform key validation: Ensure platform and key data are available
- Platform key creation: Create platform key association with error handling
Dependencies#
movedata__PlatformKeyCreateComponent(Apex action)