To set up an Order Event flow, it will depend on whether you use Limio for Salesforce, an add-on for order management in Salesforce, or not.
Limio for Salesforce comes with a pre-made Salesforce Lightning Flow to map your Salesforce Platform Events to your Salesforce data. Otherwise, with a few extra steps, you can create a Lightning Flow from scratch.
If you are not familiar with Salesforce Platform Events and Salesforce Lightning Flow, we recommend you do the following:
Below you'll find a step-by-step guide for both methods.
- If you have the Limio for Salesforce managed package installed
- If you don't have Limio for Salesforce
If you have the Limio for Salesforce managed package installed:
-
Access the Setup Menu
- Go to Setup in Salesforce.
-
Navigate to Flows
- In the Quick Find search bar, type "Flows" and select the Flows page from the search results.
-
Locate the Flow
- Find the flow named Listen to Limio OrderEvent__e.
-
Review the Transform Element
- Within the Listen to Limio OrderEvent__e flow, you will find a transform element named Map values from event to Object record.
- Open this transform element to review its configuration:
- Source Data: Set to i42as__OrderEvent__e, with a list of its fields displayed.
-
Target Data: Set to the Asset SObject, also showing a list of its fields.
- If you click on a field in the Source Data, you can map it directly to the corresponding field in the Target Data (Asset SObject).
5. Activate the Flow
-
- By default, this flow is inactive.
- To activate the flow after you configured the target object and fields mapping, click Activate in the top-right corner of the screen.
- By default, this flow is inactive.
-
- Within the Listen to Limio OrderEvent__e flow, you will find a transform element named Map values from event to Object record.
If you don't have Limio for Salesforce:
If you donโt use Limio for Salesforce, you can still set up a Platform Event-Triggered Flow to process events and create records in Salesforce. This requires creating your own custom Platform Event and configuring the flow to handle the data accordingly. Additionally, youโll need to coordinate with Limio to ensure system publishes events to your Salesforce org.
Follow these general steps to implement the solution:
- Create a Platform Event in Salesforce
- Create a Platform Event-Triggered Flow
- Reach Out to Limio Support
Steps to create Platform Event in Salesforce:
-
Access the Setup Menu
- Go to Setup in Salesforce.
-
Navigate to Platform Events
- In the Quick Find search bar, type "Platform Events" and select the Platform Events page from the search results.
-
Create a New Platform Event
- Click the New Platform Event button.
- Fill in the standard fields.
- Click Save to create the Platform Event.
-
Add Custom Fields to the Platform Event
- After saving, youโll be redirected to the Platform Eventโs detail page.
- Click New Field to add custom fields to the Platform Event.
- Choose the field type (e.g., Text, Number, Email, etc.).
- Define the Field Label, Field Name, and any necessary field attributes (e.g., length, required status).
- Click Save after creating each custom field.
Steps to create a Platform Event-Triggered Flow from scratch:
-
Access the Setup Menu
- Go to Setup in Salesforce.
-
Navigate to Flows
- In the Quick Find search bar, type "Flows" and select the Flows page from the search results.
-
Create a New Flow
- Click the New Flow button in the top-right corner of the Flows page.
- Click the New Flow button in the top-right corner of the Flows page.
-
Select the Flow Type
- In the Flow Type selection screen, choose Platform Event-Triggered Flow and click Create.
- In the Flow Type selection screen, choose Platform Event-Triggered Flow and click Create.
-
Choose the Platform Event
- In the Start element:
a. Click Edit (pencil icon) next to the Platform Event option.
b. Select the desired Platform Event (e.g., Express_Event__e created above or any custom Platform Event available in your org).
c. Click Done.
- In the Start element:
-
Add a Transform Element
- Configure the transform element as follows:
a. Source Data: Select the Platform Event fields.
b. Target Data: Select Data Type > Record and Object > Account (or any other target object).
c. Map the fields from the Platform Event to the corresponding fields in the object. For example:- Platform Event Field (e.g., Name) โ Account Field (e.g., Name)
-
Platform Event Field (e.g., Email) โ Account Field (e.g., Email__c)
- Configure the transform element as follows:
-
Add a Create Records Element
- Add the Create Records element to the canvas.
- Configure the element as follows:
a. Label: Give the element a name (e.g., Create Account Record).
b. Record: Select the Account object.
c.Create a Record from These Values: Use the values mapped from the Platform Event in the transform step.
-
Save the Flow
- Click Save and provide a name for your flow.
- Click Save and provide a name for your flow.
-
Activate the Flow
- Once saved, click Activate in the top-right corner of the screen to make the flow active and ready to handle incoming platform events.
- Once saved, click Activate in the top-right corner of the screen to make the flow active and ready to handle incoming platform events.
Related articles:
Comments
0 comments
Please sign in to leave a comment.