SK SKYVVA Documentation

How to Use Define External Key?

Introduction

As you know, our inbound processing requires the definition of external keys to create a unique key for upserting, deleting, and updating data in Salesforce. We have enhanced our mapping tool to handle complex external key definitions and added a 'Define External Key' button to the Mapping tool. This button allows you to define keys using AND or OR clauses customize the logic, or create a custom class to build your own key logic.

We provide these four options to build the external Key

In this section, you will learn how to define the external key with a new design as following below:

Option 1: All of the conditions are met (AND)

Pre-requisite

We have now selected two fields, AccountNumber and Name, for the Account object to create the external key. These fields are combined to form the external key. Additionally, we have set the LastName field for Contact and Subject as keys. Once you have finished, please click the 'Save' button.

As an example, we use our SKYVVA Data Loader to push the sample JSON file above

As a result, the first Account record will be successfully upserted because it has both external keys, namely the AccountNumber and Name fields. However, the second Account record will not be upserted because it is missing the Name field, which serves as the external key.

Option 2: Any of the conditions are met (OR)

Pre-requisite

We have now selected two fields, AccountNumber and Name, for the Account object to create the external key. Additionally, we have set the LastName field for Contact and Subject as keys, and then select 'Any of the conditions are met (OR)'. Once you have finished, please click the 'Save' button.

As an example, we use our SKYVVA Data Loader to push the sample JSON file above

As a result, both Account records will be successfully upserted because the 'OR' clause will ensure that data is upserted as long as any of the selected fields for the external key have a value.

Option 3: Customize the logic

Pre-requisite

We have now selected three fields, AccountNumber Name, and BillingCity for the Account object to create the external key.  and then select 'Customize the logic' then please fill in the logic '1 AND(2 OR 3)'. Additionally, we have set the LastName field for Contact and Subject as keys, with the default option 'All of the conditions are met (AND)' . Once you have finished, please click the 'Save' button.

As an example, we use our SKYVVA Data Loader to push the sample JSON file above

Option 4: Custom Class

Pre-requisite

You can click “Setup” on the top of the interface page.

Open this article in the interactive viewer →