Import relationship data

This plugin, which is available only in account-based environments, is used for importing the relationships between contacts and accounts.

You can import account and profile relationship data from an external system. Note that only account-based contacts can be linked with profiles.

When you import relationship data using the Relationships plugin, you can perform the following:

  • Create, update and delete a relationship between an account and a profile using the importOperationCode attribute.
  • Generate email and webhooks whenever the relationship between a profile and an account changes.

Account and profile relationships are established by providing the following properties:

Property Name Type Description Required
accountId string The ID of the account organization. Ensure that there is a valid organizationId value associated with this account. Yes, if an externalAccountId has not been provided.
contactId string The ID of the account-based contact. Ensure that there is a valid account-based profile ID associated with this property. Yes, if an externalContactId has not been provided.
externalAccountId string The external ID of the account, which is referenced by the externalOrganizationId property. This property provides the value of the customerContactId, which represents the contact ID in an external system. Yes, if an accountId has not been provided.
externalContactId string The external ID of the contact, which is referenced by the customerContactId property. Yes, if a contactId property has not been provided.
importOperationCode string

The following values are supported:

merge (default): Creates a new record if no matching record is found, otherwise it updates the record.

create: Creates the record. If a matching record is found, an error is generated. Can be used for performance gains for new records.

delete: Deletes the record.

No
primary boolean

Denotes whether the account is the primary or secondary organization of the contact. When primary is set to true, the account is added as the parent organization of the contact. When set to false, the account is set as a secondary organization.

When a primary value is not provided and the relationship already exists (primary or secondary), it is not updated. If there is no relationship, the account will be added as a secondary organization.

If you do not provide this property for an existing relationship, the existing relationship remains.

No