Contact attributes in Drift have two names- the display name seen within the Drift app and the API name used by Drift systems and the Drift developer API. Sometimes, you may need to refer to a Contact attribute via the API name, such as when using personalization tokens within a Drift playbook.
How do I find the API name of a Drift contact attribute?
There are several ways to find the API name of a Drift Contact attribute but first it’s important to understand that Drift will automatically convert the display name of an attribute to snake_case. In other words, if you create a custom contact attribute with a display name of “My Awesome Attribute”, Drift will record the API name as “my_awesome_attribute”.
Special characters are ignored during this conversion to snake_case, so that a display name of “Dave’s Awesome Attribute!” would be given an API name of “daves_awesome_attribute”. And finally, Drift will also convert other case styles to snake_case. Some examples include:
Display Name Style | Display Name | API Name |
---|---|---|
PascalCase | DavesAwesomeAttribute | daves_awesome_attribute |
kebab-case | Daves-awesome-attribute | daves_awesome_attribute |
camelCase | davesAwesomeAttribute | daves_awesome_attribute |
UPPERCASE | DAVESAWESOMEATTRIBUTE | daves_awesome_attribute |
special characters | Dave’s Awesome Attribute! | daves_awesome_attribute |
But rather than memorizing this chart, it is probably easier to use a display name that is the most useful for your organization, then verify what API name Drift applied to the display name.
Where are contact attribute API names shown?
If you just need to find the API name of an existing Drift Contact attribute, or verify the API name of a newly created custom attribute, there are several places to look.
- Drift Developer API: Use the Drift Developer API to retrieve a list of all Contact Attributes and their type, display name, and name.
- Personalization Tokens: When adding a personalization token to a Playbook, the templated text generated within Drift will reveal the API name of the selected attribute.
- Browser Dev Tools: Open your browser’s dev tools while on the contact settings page and use the network tab to find the request called “property_definitions”. The response to this request is an array of all Drift Contact Attributes.
If you still need help finding the API name of a Drift Contact attribute, reach out to your customer success manager or Salesloft support!