This article will show you how set a field in Salesforce with a value from your Source Platfom. In this example, we will set the custom field field Gateway ID (Gateway_ID__c
) on the Opportunity
record to the value provided by the Payment Gateway.
Create Flow
To create your Flow, go to Setup β Process Automation β Flows
and click New Flow
. Select Autolaunched Flow (No Trigger)
from the available options and click Create
.
Create Record Variable
Open Toolbox
and click New Resource
. Create a new resource with the following information:
Item | Value | Comment |
Resource Type |
|
|
API Name |
| Autogenerated |
Data Type |
|
|
Object |
| The object this Flow relates to |
Available for Input |
|
|
Available for Output |
|
|
Assign Value
In your Flow click the +
icon to add a new Element and select Assignment
. Configure your assignment with the following information:
Item | Value | Comment |
Label | Set Gateway ID |
|
API Name |
| Autogenerated |
Variable |
|
|
Operator |
|
|
Open Execution Log
You now need to identify the value to use to set on the Gateway_ID__c
field. To do so, open a notification and click into Execution
:
Inside your Execution, scroll down to Donation Parameters
and note the available values:
Important Concept
Opening the Execution Log and identifying the relevant variables to add into your Flow is an important concept when customising MoveData.
Create Source Platform Variable
Copy the value ProcessorTransactionId
and under Value
in Assignment
click New Resource
. Enter the following information:
Item | Value | Comment |
Resource Type | Variable |
|
API Name |
| The name of the variable made available through MoveData |
Data Type |
| Use the type appropriate to your data (in this example test is the appropriate type, but if the variable was Date/Time then Date/Time would be appropriate, etc) |
Available for Input |
|
|
Assign Source Platform Variable
Click Done
and the variable ProcessorTransactionId
will be added as the value of your assignment:
Item | Value | Comment |
Value |
| The value the logic is to set |
Your Flow should now look like:
Save Flow
You can now save your Flow. Naming conventions are not of importance but for the framework we use please see equivalent section in the article Assign a Default Value. In this scenario we would set:
Item | Value |
Flow Label |
|
Flow API Name |
|
Register Flow in MoveData Pipeline
You will now need to register your Flow in the MoveData Pipeline. For instructions on how to do this please see Assign a Default Value - Register Flow in MoveData Pipeline. In this scenario we would clone PIPELINE_DONATION_DONATION_MAPPING
and set the following values:
Item | Value | Comment |
Handler |
| API Name of your Flow |
Type |
|
|
Label |
|
|
MoveData Pipeline Setting Name |
|
|
Order |
|
|
Reprocess Notification
You can now open a relevant notification and click Reprocess
. Observe that the value ch_3Objk6Bnhz9gJviA2SlJUDbq
is set in the execution log and resultant record: