Defining relationships

When you define a relationship, you are creating the drop-down menu that users see in the application that uses the connector; so you are specifying the parent and grandparent relationships to get to the target object.

For instance, in the following screen captures, the company_id path parameter is used to create a relationship for the Create Candidate action. In this example, when you create a candidate, you need to link that candidate to a company. The name of the relationship has been called Company and the discovery action that is used to display a list of companies is Retrieve Companies. The property that uniquely identifies the company is selected along with the property that will provide the display name within the drop-down menu.

How relationships work
Figure 1. Image to show how relationships work

To define a relationship, complete the following steps:

  1. From the Connector Development Kit home page, click the connector that you want to work with.
  2. Go to the Actions tab, and then select the action that you want to work with.
  3. Go to the Request tab.
  4. In the Filter parameters section, locate the path parameter that you want to work with and click Define relationship. The Edit relationship for Path_parameter side panel is displayed.
  5. In the Define name of relationship field, provide a name for the relationship. The name refers to the discovery action that you are linking to. For example, if we use the HR company example above, this might be Company or Department.
  6. In the Relationship dropdown contents section, use the Discovery action field to select the action that returns all the possible values for the path parameter.
  7. In the List item ID field, use the menu to select the ID for the dropdown options for the path parameter.
  8. In the List item display name property field, use the menu to select the property that provides the display name for the dropdown option for the path parameter.
  9. Click Apply changes.

Result

A notification is displayed to indicate that the relationship is created successfully.