Tokens#
CRM ECA sets a small set of canonical tokens when events and actions run. Action Name of token fields can store the same entity under a different name; the canonical names below are still written when the action has a contact or mapping to expose.
User and contact configuration fields accept:
- A token name without brackets (
crm_contact) - A bracketed token (
[crm_contact]) - A numeric entity ID
Canonical tokens#
| Token | Type | Meaning |
|---|---|---|
[crm_contact] |
Contact entity | The CRM contact for the event or action |
[crm_mapped_user] |
User entity | The user mapped to that contact, when a mapping exists |
[crm_user_contact_mapping] |
Mapping entity | The user–contact mapping (mapping events only) |
[crm_contact_method] |
Method entity | The contact method (primary-changed events; add-method actions) |
[crm_relationship] |
Relationship entity | The relationship (inactive event; create-relationship action) |
[crm_primary_email] |
String | Primary email address of [crm_contact] (read-only) |
[crm_primary_telephone] |
String | Primary telephone of [crm_contact] (read-only) |
Primary email and telephone are copied from the contact's primary method at the time the token is set. They are not live field tokens.
When events set tokens#
| Event | Tokens |
|---|---|
| Mapping requested, user mapped, user unmapped | [crm_user_contact_mapping], [crm_contact], [crm_mapped_user], primary email/telephone when the contact has them |
| Contact method primary changed | [crm_contact], [crm_contact_method], primary email/telephone |
| Relationship became inactive | [crm_relationship] |
Tokens listed on an event plugin that do not apply to that event class resolve to empty.
When actions set tokens#
| Action | Result token default | Also sets |
|---|---|---|
| Load mapped contact | crm_contact |
[crm_mapped_user], primary methods |
| Load mapped user | crm_mapped_user |
[crm_contact], primary methods |
| Map user to contact | crm_contact |
[crm_mapped_user], primary methods |
| Ensure contact for user | crm_contact |
[crm_mapped_user], primary methods |
| Unmap user from contact | (none) | — |
| Add email / telephone / address | crm_contact_method |
[crm_contact_method], [crm_contact], primary methods |
| Find contact by email | crm_contact |
primary methods |
| Create relationship | crm_relationship |
[crm_relationship] |
Load mapped contact, load mapped user, ensure, and find-by-email leave the result token unset when there is nothing to load. They do not throw in that case.
Add-method and create-relationship always also write the canonical
crm_contact_method or crm_relationship token in addition to a
custom Name of token.