This article will show you how set a picklist value in Salesforce with a value from your Source Platform. In this example, we will set the custom field Processor (Processor__c
) on the Opportunity
record to the value provided by the Source Platform.
Creating 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 a 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 related to |
Available for Input |
|
|
Available for Output |
|
|
Open Execution Log
You will need to identify the value to use to determine the Processor
value provided by the Source Platform.
Note: In this scenario, we receive a payload from Raisely, with a potential Processor
value equal to either stripe
or paypal
.
Inside your Execution, scroll down to Opportunity Parameters
and note the available values:
Create Source Processor Variable
Copy the variable Processor
and under Resource
in Decision
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 |
Available for Input |
|
|
Add Decision Component
In your Flow click the +
icon to add a new Element and select Decision
. Configure your decision with the following information:
Item | Value | Comment |
Label | Assess Platform |
|
API Name |
| Autogenerated |
Outcome Label |
|
|
Outcome API Name |
|
|
Resource |
|
|
Operator |
|
|
Value |
|
|
Add Order Outcomes
Note: In this scenario we expect the Processor
value provided by Raisely, to be either stripe
or paypal
.
Depending on the Processor
value provided by Raisely, flow logic will need to "split" into each possible outcome to set the correct value. This requires adding each possible value as an Order Outcome
within your decision component (in this case, the Assess_Processor
decision component).
Outcome Order: Stripe
Add the following information to the decision component's outcome details:
Item | Value | Comment |
Label | Assess Processor |
|
API Name |
| Autogenerated |
Outcome Label |
|
|
Outcome API Name |
| Autogenerated |
Outcome Resource |
| The variable from your source platform |
Operator |
| The logic the decision to use |
Value |
|
|
Outcome Order: PayPal
In the decision component, next to Outcome Order, click the +
icon to add a new Outcome Order
, and add the following details:
Item | Value | Comment |
Label | Assess Processor |
|
API Name |
| Autogenerated |
Outcome Label |
|
|
Outcome API Name |
| Autogenerated |
Outcome Resource |
| The variable from your source platform |
Operator |
| The logic the decision to use |
Value |
|
|
Your flow should now look like:
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 Processor - Stripe |
|
API Name |
| Autogenerated |
Variable |
|
|
Operator |
|
|
Value |
|
|
Repeat this process PayPal
under decision component with Value equal to PayPal
. Your flow should look like this:
Save Flow
Please ensure you save and activate your Flow. You do not need to add any entries in the MoveData Pipeline as the Flow and Field Set have already been added.