Order record match 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. The flow commentary in this document was generated with AI assistance.
Overview#
Flow name: MoveData_Commerce_Order_Duplicate Label: [MoveData] Commerce: Order - Record Match Type: Auto-Launched Flow Template API version: 56.0 Status: Active
This flow performs duplicate detection for commerce order records by using platform keys to identify existing opportunities in Salesforce. It provides a streamlined approach to order matching focused on direct platform key lookup.
Purpose#
The flow attempts to find an existing Opportunity record for a commerce order to support update operations. It performs a simple matching strategy:
- Match against platform key using the
movedata__Platform_Key__cfield on Opportunity records - Enable reliable order deduplication during commerce transaction processing
Salesforce fields#
| Field API name | Field type | Purpose in flow |
|---|---|---|
| Opportunity.movedata__Platform_Key__c | Text | Platform key for direct opportunity matching |
| Opportunity.Id | ID | Opportunity record identifier returned as result |
Input variables#
Core matching data#
| Variable | Type | Required | Description |
|---|---|---|---|
PlatformKey |
String | No | Generated platform key for direct opportunity lookup |
Output variables#
| Variable | Type | Description |
|---|---|---|
Result |
String | Salesforce Record ID of matching opportunity (if found) |
Flow logic#
1. Platform key direct matching#
The flow attempts platform key matching:
- Condition: Platform key is provided
- Action: Query Opportunity records where
movedata__Platform_Key__cequals the provided platform key - Result: Returns matching opportunity ID if found
Error handling#
Missing data scenarios#
- No platform key: Flow terminates without performing lookup
- No match found: Result remains null, indicating new record should be created
Data quality validation#
- Null values: Graceful handling of missing platform key parameter
- Query failures: Uses
assignNullValuesIfNoRecordsFoundfor robust error handling
Dependencies#
None