Relate Data Objects

Relate Data Objects

The relate data object flow step is used to relate two data objects between connectors. When a connector connects to the App Xchange platform, we transfer data from that system to our platform in what we call cache. In the case that we are transferring data between two or more systems, there is no out-of-the-box relationship between this disparate data. The relate data object step helps solve that problem, when needed.

Getting Started

To use the Relate Data Object step, add a new flow step and choose the Relate Data Object type.

After adding a title and description of your choosing, you’ll need to choose a type (in this case, Relate Data Objects).

Figure 1: Relate Data Object Details

In order to relate to data objects, we have to provide the details for both objects. When defining an object, enter the connector and the data object we want to relate. In figure 2, we are choosing to relate Procore RFIs. Once we have our object, we have to select the key. The key is a selectable field from the data object definition. Once we select our key, it will provide inputs for the corresponding value. In figure 2 below, we will search the JSON for a procore RFI with a key of id and a value of 14791841.

We use a key locator pattern to locate the key in the JSON data. The key locator is specified in the data object definition and falls outside the scope of this document. For our purpose, we will assume the key locator is defined for the ‘id’ key found in figure 2.

Figure 2: Relate Data Objects - Object 1

Object 2 will follow the same structure as the first object but should represent the other side of the relationship. In figure 2 below, we are defining object 2 as an rfi reply from procore with a key of id and a value of 1.

Figure 3: Relate Data Objects - Object 2

What is an Embedded Object?

Both objects have a toggle for embedded target. This represents a child data object. In our example using RFIs, it’s possible that some RFIs have comments. A comment on an RFI would be an example of a child data object. By selecting the embedded target, selecting the location and defining the key; we can also bring in these child objects as part of our relationship. Figure 4 shows a defined embedded target.

Child data objects in this case are not considered data objects for the purpose of finding a relationship between a RFI and an RFI Reply. It will simply add the data of the child object to the relationship for reference purposes.

Figure 4: Related Data Objects - Embedded Target