ID linking

The ID linking component links IDs between different systems. It lets you store and retrieve IDs associated with data objects in a reliable and efficient manner.
The bucket contains the bucket ID and an array of linked objects between the systems. Linked object IDs may be a string, number, or object.

Examples:

Bucket Sample 1
{
  "bucketId": "some_sf_bucket_id",
  "linkedIds": [
    {
      "systemAId": "00344000020qT3K",
      "systemBId": 123
    },
    {
      "systemAId": "0034400001uxwXZ",
      "systemBId": 62
    }
  ]
}
Bucket Sample 2
{
  "bucketId": "some_sf_bucket_id",
  "linkedIds": [
    {
      "systemAId": "00344000020qT3K",
      "systemBId": {
        "company": "mvise-eio",
        "id": "7c7fec00-d313-40c7-890b-3bc857bbb7dd"
      }
    },
    {
      "systemAId": "0034400001uxwXZ",
      "systemBId": {
        "company": "mvise-salessphere",
        "id": "fc64c4f0-06f7-47ef-b3b6-8441b4837305"
      }
    }
  ]
}

Credentials

Bucket ID

A text input of a bucket ID to assign.

Triggers

This component has no trigger functions. This means it will not be accessible to select as a first component during the integration flow design.

Actions

Delete object

The Delete Object action deletes a linked object the list of linked object in the specified bucket.

delete object

Configuration fields

System Type to delete by (a key to lookup)

Required.

A system to lookup the ID in. Either System A or System B.

Do not throw error when no object found

Optional. This option defines the strategy to follow if no object is found by the provided key.

By default, an error — No object found by the provided ID in the bucket — is thrown if no object is found by the provided key.

If this checkbox is selected, an empty message is returned instead of the above error.

Input metadata

sourceSystemId

Required. The ID to lookup in the source system. This can be a Number, String, or Object.

Output metadata

result
If the result is empty

The output is an empty message body object.

If the result is not empty

The output is an object representing a bucket. Contains a bucket ID and an array of linked objects.

Lookup object

The Lookup Object action searches linked objects in the bucket specified by the source system ID.

lookup object

Configuration fields

Allow ID To Be Omitted

Optional. By default the ID of the source system to lookup in field is a required field.

However, if this checkbox is checked, that field becomes optional.

Object Not Found Behavior

Required. This field has two possible values:

  • Allow zero results ; or

  • Wait for object to exist.

    Allow zero results

    Optional. If this is not set, an error is thrown if zero results are returned..

    When selected, the empty object, {}, is emitted if zero results are returned.

    Wait for object to exist

    Optional. If this is not set, [what, specifically is the consequence of not setting this?] if zero results are returned.

    When selected, rebounds are applied and the action waits until the object exits if zero results are returned.

System ID Type

Required. A system to lookup the ID in. Either System A or System B.

Input metadata

sourceSystemId

Required. The ID to lookup in the source system. This can be a Number, String, or Object.

This is required by default.

It can be made optional by setting the Allow ID To Be Omitted option, however.

Output metadata

result
If the result is empty

The output is an empty message body object.

If the result is not empty

The output is an object representing a bucket. Contains a bucket ID and an array of linked objects.

Upsert object

The Upsert Object action creates or updates a linked object in the bucket specified by the source system ID.

upsert object
Buckets in Maester are currently created with infinite lifetime.

Configuration fields

System ID Type

Required. A system to lookup the ID in. Either System A or System B.

Input metadata

System A ID

Optional. The System ID value: a number, string, or object.

System B ID

Optional. The System ID value: a number, string, or object.

Write entire bucket contents

The Write Entire Bucket Contents action writes linked objects as an object array in the bucket.

The Bucket ID needs to be specified in the credentials.

write entire bucket contents
Buckets in Maester are currently created with infinite lifetime.

Configuration fields

There are no Configuration fields in this action.

Input metadata

linkedIds

A required array. An array of objects with optional fields:
[{ systemAId: ["object", "string"], systemBId: ["object", "string"] }]

linkedIds example
    [
      {
        "systemAId": "aid",
        "systemBId": "bid"
      },
      {
        "systemAId": "aid2",
        "systemBId": "bid2"
      }
    ]

Output metadata

bucketContents

Required. Echo back the value that was saved.

Read entire bucket contents

The Read Entire Bucket Contents action reads linked objects (an array of objects) from the bucket.

The bucket ID needs to be specified in the credentials.

read entire bucket contents

Configuration fields

There are no Configuration fields in this action.

Input metadata

There is no Input Metadata in this action.

Output metadata

bucketContents

Required. Emit the entire contents of the bucket in a single message.

Use case

The use case scenario involves a Webhook real-time flow where data is received and stored by the Maester component.

After a certain period, another real-time flow is triggered, and, based on a specific ID, the stored data needs to be retrieved.

The ID Linking component plays a crucial role in storing and managing these IDs.

First flow

In the first flow, data is received via the Webhook component, which contains information about an order for calculating product costs.

The Maester component stores this data and associates it with a dynamically generated Maester Object ID. The ID Linking component is then used to store this ID for future retrieval.

first flow view
Figure 1. First flow view

The flow consists of the following steps:

  1. The Webhook component receives the order data.

    {
      "Order": "0406654608",
      "ProductID": 858383,
      "City": "Berlin",
      "Address": "Friedrichsruher Str. 37",
      "Price": 34.45,
      "Quantity": 30
    }
  2. The Maester component stores the received data using the dynamically generated Maester Object ID.

    maester component

    Sample example of Maester component data:

    {
      "data": {
        "body": {
          "Order": "0406654608",
          "ProductID": 858383,
          "City": "Berlin",
          "Address": "Friedrichsruher Str. 37",
          "Price": 34.45,
          "Quantity": 30
        }
      },
      "maesterObjectId": "bf485bcd-e0db-4f2d-a805-e5084a4cf26c",
      "metaHeaders": [],
      "searchHeaders": []
    }
  3. The ID Linking component stores the Maester Object ID, linking it to the order value from the Webhook data.

    maester object id
    {
      "result": {
        "systemAId": "0406654608",
        "systemBId": "bf485bcd-e0db-4f2d-a805-e5084a4cf26c"
      }
    }
  4. The JSONata component calculates the sum of the order, which can be sent to a CRM or database.

    jsonata component

    JSONata expression:

    {
      "sum, €": $getPassthrough()."step_1".body.Price * $getPassthrough()."step_1".body.Quantity
    }
    Use the previous credentials or create new ones with the same Bucket ID.
    same bucket id

Second flow

In the second flow, data is received via the Webhook component, which contains information about the order description for calculating product dimensions.

The ID Linking component retrieves the Maester Object ID associated with the order value from the previous flow.

The Maester component then retrieves the stored data using the obtained ID.

Finally, the Transformation component calculates the dimensions of the order.

Second flow view

+ image::id-linking/second-flow-view.png[]

The flow consists of the following steps:

  1. The Webhook component receives the order description data.

    {
      "Order": "0406654608",
      "Description": {
        "Width": 300,
        "Height": 200,
        "Depth": 210,
        "Weight": 0.75
      }
    }
  2. The ID Linking component retrieves the Maester Object ID associated with the order value from the Webhook data. It waits for the object to exist before triggering the Webhook.

    id linking component waits

    Sample example of ID Linking component with the received Maester Object ID:

    *ID Linking sample with the received Maester Object ID.
    Use the previous credentials or create new ones with the same Bucket ID.
    previous credentials
  3. The Maester component receives the stored data using the retrieved Maester Object ID.

    maester component 2
  4. The JSONata component calculates the dimensions of the order.

    jsonata component 2

    JSONata expression:

    {
      "Weight, kg": data.body.Quantity * $getPassthrough()."step_1".body.Description.Weight,
      "Volume, m³": 0.001 * $getPassthrough()."step_1".body.Description.Width * $getPassthrough()."step_1".body.Description.Height * $getPassthrough()."step_1".body.Description.Depth
    }
  5. The Maester component deletes the stored object to optimize storage.

    maester deletes stored object
  6. The ID Linking component deletes the linked object for the Maester Object ID associated with the order value.

    id linking deletes linked object