How can we help?

System variables

Overview

Cordial system variables are reserved variables defined by the platform. Listed below are the Cordial system variables available for use in message content. These variables can be included in your message links so the values can be processed by third-party tracking applications.

Variable Description Syntax
cID Contact ID: A unique identifier created for each contact. {$contact.id}
mcID Message Contact ID: A concatenation of several system values. Detailed info below. {$mcID}
linkID Link ID: A unique identifier created for each link delivered in a message. {$linkID}
email Contact email address. {$contact.channels.email.address}
mdtLastSent Array of recently sent automation templates. {foreach from=$contact.mdtLastSent key=mdtID item=t}
{$mdtID}
{/foreach}
msID Message ID: A unique identifier created for each message. {$message.msID}
name Message name. {$message.name}
triggerData Trigger Data: Renders the event that triggers an automated message or data job. Detailed info below. {$triggerData}

Message contact ID

The mcID (Message contact ID) variable is a concatenation of several system values that describes which account sent a message, which message was sent, which contact the message was sent to, and message type.

Example mcID:
264:590261c7f0c360ee35a8046fot5900ddf2ac0c81178189d93b

The mcID is made of three main parts:

  1. msID (Message ID)
    msID is made of three parts:
    1. Account ID
    2. MongoDB ID for the message
    3. Type of message
      • ot = one time
      • rm = recurring or automated message
  2. cID (Contact ID)
  3. Place holder for future use

A common application for using mcID and linkID is to pass these values in a link via query string parameters that can then be used for downstream order conversion tracking by the Orders API. The mcID is the message specific identifier for an individual contact.

href="http://example.com/mylink?linkID={$linkID}&mcID={$mcID}"

Trigger data properties

For event triggered automations, you can render the event that triggers a message using the following Smarty variable:

{$triggerData}

To access the property of the event, you can do so with the following, where propertyKey is replaced with the Key of the property passed with the event:

{$triggerData.properties.propertyKey}

For example, if a message automation is triggered by a custom event called page_browse, and that event contains a property called URL, you are able to render that property's value using the following Smarty code:

{$triggerData.properties.url}

Contact data uploaded to or otherwise stored at Cordial is replicated to a secondary data layer to facilitate speed and availability. This replication process typically ensures data consistency within 30 seconds, dependent upon update frequency and volume. Updates made to contact records (new or existing) may not be immediately available, and we recommend waiting 30-60 seconds before issuing a query for recently updated information.

In the next article, you can learn about account variables.

Comments

0 comments

Please sign in to leave a comment.