#
Learning Objectives :-
This unit describes:-
- Create Integration.
- How to use the init-operation ‘Delete + Upsert’ to handle delta changes for parent-child interface?
Introduction: #
In this tutorial, we will learn How to use the init-operation ‘Delete + Upsert’ to handle delta changes for parent-child interface? We have added a new mode into our chained processing so that now we can handle delta changes from the external client. Before we always delete first all child records and then insert all again. This is very simple and easy and works perfectly when the sender always sends the complete data again. For example, an order contains 5 items. When for the next times it sends 5 items again for the same order 4711 then we delete first and then insert again. Thus we always have consistent data for the sending application. But in some situations, the sender cannot send the complete 5 items again. It can send only the delta e.g. 3 of 5. When we use our old mode we will get only 3 items because these 3 were changed on the sender side. So we delete all 5 in Salesforce and insert 3 new ones. Finally, we have 3 items in Salesforce but 5 in the sending application. Now the data is inconsistent between the sending application and Salesforce. The new mode with the value ‘ Delete + Upsert’ can handle this situation where the sender sends only changed data. This example cannot handle as well with our new mode. Our new mode can help to keep the data of the existing record correctly when we don’t delete anymore but update the record. But the sender needs to send 5 items
Pre-required: #
- Create Integration
- Create Outbound and Inbound Interface
- Create iChained-Interface
Step 1: Create Integration:
To know detail about Integration, please follow this tutorial. What is Integration, and How to use it?
How to create iChained Interface?
Step 2:
In which create an new two Interface as shown below in the picture.
- To create an iChained Interfaceyou need to have at least two interfaces. However, you can create the iChained Interface on Contact Interface. Please go to Interface Related page Contact, scroll down on iChained Interface section and Click the New iChained Interface.
- Fill the fields and click on the save button.
- Fill the Parent Interface
- Select Sequence
- Select Child Interface
- Select Parent Relationship Name/Foreign Field
- Select Int Operation
As shown in below picture:
In Below picture Shows “ How to use the init-operation ‘Delete + Upsert”
Save it:
Summary #
Finally, we have learned about How to use the init-operation ‘Delete + Upsert’ to handle delta changes for parent-child interface? Here we have added a new mode into our chained processing so that now we can handle delta changes from the external client.