Cordial Cloud Mode Integration

Send events to Cordial using RudderStack cloud mode.

After you have successfully instrumented Cordial as a destination in RudderStack, follow this guide to correctly send your events to Cordial in cloud mode.

Find the open source transformer code for this destination in the GitHub repository.

Identify

You can use the identify call to create or update a contact in Cordial. RudderStack uses the Contacts API to send this data.

info
Make sure to create the contact attributes in the Cordial dashboard before sending them in your identify events.

A sample identify call is shown:

rudderanalytics.identify("1hKOmRA4GRlm", {
  name: "Alex Keener",
  email: "alex@example.com",
  logins: 2,
}, {
  externalId: [{
    type: "cordialContactId",
    id: "12345"
  }, ],
});

Supported mappings

RudderStack maps the following identify fields to the corresponding Cordial properties:

RudderStack propertyCordial propertyNote
traits.email
context.traits.email
Either email or externalId.id is required.
channels.email.address-
context.externalId.id
Either email or externalId.id is required.
cIDexternalId.type should be set to cordialContactId (Cordial-generated database identifier).
traits.subscribedStatus
context.traits.subscribeStatus
channels.email.subscribeStatus
traitsattributesUser traits except the email and subscribeStatus fields.

Track

You can use the track call to track and create a contact’s activity in Cordial. RudderStack uses the Contact Activities API to send this data.

info
Make sure to create a contact in Cordial using an identify call before sending the track events for that contact.

A sample track call is shown:

rudderanalytics.track(
  "Product Reviewed", {
    review_id: "86ac1cd43",
    product_id: "9578257311",
    rating: 4.0,
    review_body: "Good product.",
  }, {
    externalId: [{
      type: "cordialContactId",
      id: "12345",
    }, ],
  },
);
warning
Cordial has reserved some event names that automatically generate an activity record. Hence, do not use these names while sending your track events to Cordial.

Supported mappings

RudderStack maps the following track fields to the corresponding Cordial properties:

RudderStack propertyCordial propertyNote
event
Required
a-
context.externalId.id
traits.email
context.traits.email
Required
contact identifierexternalId.type should be set to cordialContactId (Cordial-generated database identifier).
propertiesproperties-
timestamp
originalTimestamp
atsISO 8601 date in the format yyyy-MM-ddTHH:mm:ss.SSSZ.

For example: 2022-02-01T19:14:18.381Z

Questions? Contact us by email or on Slack