Skip to main content

External Identities

Data in Different Systems

Below is fragment of a product document:

{
"@type": "Product",
"externalIdentity":
[
{
"@type": "ExternalID",
"internalType": "Product",
"externalSystemCode": "SF",
"externalId": "K02482QM"
},
{
"@type": "ExternalID",
"internalType": "Product",
"externalSystemCode": "SapS4",
"externalId": "30009396"
}
],
"name": "My Super Comfy Mattress",
"sku": "K02482QM",
"uniqueText": "01234e61-579b-4384-a0c9-e433ec5ac506"
}

The line "uniqueText": "01234e61-579b-4384-a0c9-e433ec5ac506" says that within SyncHive this product document is identified by an ID of 01234e61-579b-4384-a0c9-e433ec5ac506.

The lines:

{
"@type": "ExternalID",
"internalType": "Product",
"externalSystemCode": "SF",
"externalId": "K02482QM"
}

say that:

  • the product document has been stored into the external system of the integration with integration key SF (in some form specific to that system)
  • the external system identifies the stored data using an ID of K02482QM

Similarly, the lines:

{
"@type": "ExternalID",
"internalType": "Product",
"externalSystemCode": "SapS4",
"externalId": "30009396"
}

say that:

  • the product document has been stored into the external system of the integration with integration key SapS4 (in some form specific to that system)
  • the external system identifies the stored data using an ID of 30009396

The correspondence between the various IDs is as follows:

SyncHiveSFSAP
01234e61-579b-4384-a0c9-e433ec5ac506K02482QM30009396

External identities are how SyncHive keeps track of the same data in different systems.

Collecting Identities

Every time a document is:

  • created by an integration for the first time (so the document does not exist in any form in SyncHive), or
  • published into an external system by an integration

the document is assigned a new external identity by the integration.

An example illustrates the point:

A sales order is created in SAP with primary key 30009396.

The SAP integration detects the order creation in SAP, and creates a document, D, which includes the SAP identity, as follows:

"externalIdentity":
[
{
"@type": "ExternalID",
"internalType": "Product",
"externalSystemCode": "SapS4",
"externalId": "30009396"
}
],

D is stored in SyncHive, at which point it is assigned a SyncHive ID of say ABC. D now has the same external identities as above, but also has a SyncHive ID:

"uniqueText": "ABC"

SyncHive republishes D to the SalesForce integration.

D is written into SalesForce as say sales order 123-456 – the id that SalesForce assigns the sales order – and the SalesForce integration tells SyncHive about the new identity for D.

D now as the following external identities:

"externalIdentity":
[
{
"@type": "ExternalID",
"internalType": "Product",
"externalSystemCode": "SapS4",
"externalId": "30009396"
},
{
"@type": "ExternalID",
"internalType": "Product",
"externalSystemCode": "SF",
"externalId": "123-456"
}
]

D still has its SyncHive ID of:

"uniqueText": "ABC"

A single document has only one SyncHive ID, but can have many external identities (one per external system where the document has been stored in some form or other).