This unit describes:-
- About 3 operation types Upsert Auto External ID, Update Auto External ID, and Delete Auto External ID.
- And why we need these three operation types?
Why we need Upsert Auto External ID, Update Auto External ID, and Delete Auto External ID? #
We are providing the “AUTO” operation to handle the problem that our customers faced. The issue was we were not able to handle the mixed key(mix key means if in the account record customer provides the external Id but also the Salesforce Id)value because the user needs to specify an operation for an interface e.g. UPSERT and he needs to check the box “Ext Id” in the mapping. If no external Id was provided, we run into an error. The solution for him was that he has to split the interface into two interfaces and provide the data clearly but not a mixed-mode. One data provider only Salesforce Id and thus sets the operation to UPDATE. The other data provide only external Id and thus set the operation to UPSERT.
But if we could handle this automatically from our side, the customer would not need to split the interface and not needed to create two interfaces.
So here we have a solution, the new implementation is about the combination of “External Id” and “Salesforce Id”. New operation Upsert/Update/Delete Auto Id creates or updates the record based on Salesforce id or external fields are specified on the interface. This would improve the performance because an update with a dedicated key is faster than upsert where a search has to be performed first to find the record. But if a Salesforce Id is provided directly there is no search needed. Salesforce Id is always a single field e.g. the Salesforce Id whereas the external Id could be 1 or more than one.
Upsert Auto External ID #
The procedure is given below:-
Create Integration:-
Create Interface:-
- Select Upsert Auto External ID in the Operation type section. As shown in the picture given below.
- We have 2 fields as External ID. Many external fields are specified on the interface is combining key. As you can see in the picture given below:-
- The account will be upsert/delete based on:
-Id: if salesforce id is specified in data payload then update the record based on its
value.
-External fields: ERP_DEBTOR_ID__c, ERP_DEBTOR_ID2__c is setting as on interface.
If salesforce Id is not specified or blank, then Account will upsert based on
ERP_DEBTOR_ID__c AND ERP_DEBTOR_ID2__c. - Navigate to mapping section and map it like the picture given below
- Tick two boxes external id on Fields ERP_DEBTOR_ID__c,
ERP_DEBTOR_ID2__c - Click Save
- The result of upload data can be seen in message monitoring as shown in the picture given below. It is created by an external ID.
We have so many cases to use Upsert Auto External ID:-
- Updating Account that using new Operation Type Upsert Auto Id
- Update Account base on Salesforce Id, Other external field are not in data
payload.
Delete Auto External ID #
- We can see in the picture given below.
- We Delete record base on given salesforce Id.
- Delete record base given external fields.
UpdateAuto External #
- If salesforce Id is not blank, then the record will update by its value. Otherwise, update the record by external fields setting on the interface.
- We can see in the picture given below how to select Update Auto External ID:-
- Update records based on specifying the external field on the interface.
- Update record based on given salesforce Id.