Tutorials

  1. Home
  2. Docs
  3. Tutorials
  4. 58. What is the different init-operation for the chained interface?

58. What is the different init-operation for the chained interface?

Learning Objective:

After completing this unit, you’ll be able to:

  • Describe what are the different init-operation for the chained interface.
  • Comfortably use  different init-operation for the chained interface.

Introduction

Skyvva provide the different init-operation for the chained interface I,e None, Delete First, Delete specific child and Delete Anyway.

Which are different init-operation for the chained interface?

The feature with our inti operation for the chained interface is to handle deletion of child from the sending system. For example, if you have a spreadsheet that contains Account & Contact data. You would like to use Skyvva to run an insert for both Account and Contact. There are different init-operation for the chained interface as per condition.

  • None : Add new child or update existing.
  • Delete First: Delete all child record of parent.
  • Delete specific child: delete specific child of parent.
  • Delete Anyway: This will always delete the children, no matter if you only send Parent or Parent + Children.

1. None:

This is default option when we create IChained Interface. Nothing is deleted here but the new children added or existing children updated. It is not correlated with previous data So there may be different levels between order items in SAP and in Salesforce.

  • Create Integration
  • Create two interfaces -Account and contact where account is parent interface and contact is child.
  • Click on related tab of account interface and scroll down the page to IChained interface.
  • Click on new IChained interface.

2. Delete First

In this case, when the child record is inserted or updated the previous ones should deleted. This ensures that the Salesforce page contains only the child, included in the latest payload.

We have in ichain the option the set “Delete First” to delete first the existing children before adding new children. For example, the message come with the message A. If A contain a child record then the deletion works. In this case we delete all existing children and create the new child coming with the new message. But if we send only the parent data only parent data get updated. No children get deleted.

“Delete First” in Chain is that when we have child record in the message e.g. Parent + Child then it delete first all existing children and then add the new children which come with the current message. The sender need always to send all children. The sender cannot send only children which has been changed at the sender system. If he only send changed record which has been changed at the sender system the situation on both system. e.g. sender and Salesforce is not consistent anymore. This mode does not support that the sender sent deltas. This mode works only correctly when the sender always send in full mode e.g. all children every time!

How to use “Delete First”?

Follow the given steps:

Step1: Create hierarchical interface Account, Conatct  where contact is  a hild interfaces.

3. Delete specific child

How to use Delete specific child :

Follow the given steps:

step1: Create hierarchical interface Account, Conatct where contact is a child interfaces.

We use init Operation = None

Step2: Upload the following data.

We have account parent fields

Account (Parent fields):

  • AccountName=CacaCambo (ExternalID),
  • BillingCountry=Cambodia and

Contact child fields:

  • LastName=Jen (ExternalID),
  • FirstName=Jonh,
  • Email = jonh@test.com
    Here is the records account and contact after processed

Step3: Now We use init Operation = Delete Specific Child in IChained Interfaces to delete some
values in child interface data but it is not External ID value.

Now we want to change only email value I,e  jonh@test.com to jen@test.com

where,

  • LastName=Jen (ExternalID),
  • FirstName=Jonh like before.
    So user just push above data again the data will be created again with last change email= jen@test.com

Here is the result of contact data on message monitoring change email value

4. Delete child anyway:

With Delete First ‘, it only works if the message comes with a parent + at least 1 child. If you only sent parent without a child, it did not work. So that the childs are deleted even if there is no child in the message.

Skyvva provide  new option I,e Delete child anyway. This will always delete the children, no matter if you only send Parent or Parent + Children. We have both options in mind.

How to use Delete child Anyway ?

Follow the given steps:

step1: Create hierarchical interface Account, Contact where contact is a child interfaces.

 

 

 

 

 

 

 

 

Was this article helpful to you? Yes No

How can we help?