141. How to post complex objects with transactional support? #
Learning Objectives:-
This unit describes:-
- Overview of Integration or Interface
- Overview of Workflow and it’s Transaction
- How to post complex object with transactional support?
Introduction:
In this tutorial shows the ways of post complex object with transactions.We have added to our v3 inbound processing the transactional processing meaning that for example when an order cannot be posted completely we rollback. We will not produce partial orders to be posted in Salesforce when this flag is set e.g. when we are running in the transactional processing mode. This mode is a new mode to our normal mode where we post the object in a non-transactional mode. This cause problem that we have partial orders we created in Salesforce.
What is Workflow and Workflow transaction?
Workflow is used to push the database on the condition, and the condition bases on Interfaces.
Such as the Message that belongs to Account Interface will push into Account, and the Message that belongs to Contact Interface will push into Contact by Workflow.
Workflow Transaction lets users automate standard/Custom internal procedures and processes to save time across our SKYVVA App. A workflow transaction is the main container for a set of workflow instructions.
Required Step:
Step 1: Create Integration:
To know detail about Integration, please follow this tutorial. What is Integration, and How to use it?
- Here’s Integration
Step 2: Create Metadata and Repository as shown in below:
- Create Metadata
- Create Istructure Repository
- Create Message type
Step 3: Create an inbound interface and link it with the message type, then specifically check the ‘Transitional Handling’ option.
Step 3: Do mapping select External Id.
Step 4: Open the Postman to Configuration.
Copy the URL from Salesforce Classic and paste the parameters in Postman. Input the following: integration name, interface name, mode=Synchronous, response-format=json, request-format=json.
Step 5: Open the developer console in your Salesforce org to execute the script. Then, copy the selected log line and paste it into Bearer.
Step 6: Input the JSON payload in the Body header.
- Our payload has a non-value of field Name.
- Go to message monitoring to view the message
Note: When the Transactional Mode flag is ON, if a record fails in one of the messages, all messages within the entire tree will be rolled back. Let’s take an example: we have two levels of messages – account and contact. When an Account fails, it will be canceled throughout the entire tree, and its child nodes will show as ‘New’ as follow: