Token categories & examples
We think of tokens in 3 categories:(1) Fields in Inflection
(1) Fields in Inflection
- On the contact:
first name,company name,lead score,email address,job title,phone number, etc. - On the user:
role,last login date,user ID,permissions level, etc. - On the org (or workspace):
plan,workspace created date,feature enabled,organization ID,subscription tier,billing status, etc. - On the account:
AE,CSM,renewal date,contract value,health score,onboarding status, etc.
(2) Simple calculations
(2) Simple calculations
- Sums: like summed intent and fit scores (
+) - Concatenations: like full name concatenation; first name & last name (
concat()) - If statements: if user role = “Admin”, show admin-specific content; if login count > 10, return “Active User”; etc. (
if()) - For a full list, visit our tokens glossary
(3) Advanced functions
(3) Advanced functions
- User-level aggregations:
- Number of times a user has completed a specific event (
countIf) - User’s most recent product events (
getMostRecentProductEventUser) - Top event properties for a specific user (
topEventPropertyValuesUser) - For a full list, visit our tokens glossary
- Number of times a user has completed a specific event (
- Workspace-level aggregations:
- Number of times a specific event has occurred in a workspace (
countIfPersonsGroup) - Top users by events in a workspace (
topEventPropertyValuesOrg) - Whether any user in the workspace has performed specific actions (
countIfPersonsGroupPersonField) - For a full list, visit our tokens glossary
- Number of times a specific event has occurred in a workspace (
Where to use tokens
Tokens are used to personalize journeys and emails.Tokens in emails
Once you’ve created your token, follow the following methods to use the token in an email.As email copy
As email copy
To include a token in email copy:
-
In a text content block, select Tokens in the menu.

-
Search for and select the token to include.

-
Once selected, the token will appear in the email as below. Note that the token will take on the formatting of the text block its in.

In the subject line
In the subject line
To include a token in the subject line of the email, begin typing the field or token you wish to include.
Once selected, the token will appear in the subject line as below.


As an image
As an image
To use a token to display a dynamic image in an email, drag an image block onto the email and enable Dynamic image. Then copy/paste the token into the Dynamic Url editor.

As a link
As a link
To use a token to create a personalized link, copy/paste the token in the Url editor. Note that the syntax is slightly different (single quotes rather than double).

Tokens in journeys
To use a token to determine the path of a journey, use the Branch by token flow step.Testing
In the token editor
In the token editor
Test token values directly in the editor. Add a contact to the preview table and click Add to preview.
Once added, view the token output value and variables used to calculate it. The variables visible in the preview editor will change depending on the variables used in the token calculation.


In the email editor
In the email editor
To test a token in an email, follow the testing steps detailed in the Visual Email Editor doc. Note that when sending an email test where the email contains a token, a contact with a token value is required to send the test email.
In a journey canvas
In a journey canvas
To test a token in a journey, clone the journey and replace all actions in journey paths with an add to static list flow step. This will provide a preview for how pathing will behave in the actual journey.

Tokens glossary
Simple calculations
Simple calculations
abSplit(n)
Formula:abSplit(2)Components: n = number of splits for A/B testingUse Case: Randomly assign users to different test groups for A/B testing campaignsExample: abSplit(3) assigns users to groups 1, 2, or 3 for testing three email variantsadd (+)
Formula:value1 + value2Components: value1 and value2 = numbers to add or strings to concatenateUse Case: Calculate totals or combine text fieldsExample: column("deal_value") + column("upsell_value") to get total opportunity valueand
Formula:condition1 and condition2Components: condition1 and condition2 = Boolean expressionsUse Case: Combine multiple conditions for complex logicExample: column("status") == "Active" and column("last_login") >= now()-30 for active recent userscapitalize()
Formula:capitalize(string)Components: string = text to capitalizeUse Case: Format names with proper capitalizationExample: capitalize(column("first_name")) converts “john” to “John”column()
Formula:column("field_name")Components: field_name = name of the data field to referenceUse Case: Reference contact, user, org, or account fields in calculationsExample: column("company_name") retrieves the company name fieldconcat()
Formula:concat(string1, string2, ...string_n)Components: string1, string2, etc. = text values to combineUse Case: Combine multiple fields into a single text valueExample: concat(column("first_name"), " ", column("last_name")) creates full nameconcatWithSpace()
Formula:concatWithSpace(string1, string2, ...string_n)Components: string1, string2, etc. = text values to combine with spacesUse Case: Combine text fields with automatic spacingExample: concatWithSpace(column("first_name"), column("last_name")) creates “John Smith”contains()
Formula:contains(text, search_value)Components: text = text to search in, search_value = text to findUse Case: Check if a field contains specific textExample: contains(column("job_title"), "Manager") returns true if title contains “Manager”dateTimeFormat()
Formula:dateTimeFormat(date_time, format_string)Components: date_time = date field, format_string = desired format patternUse Case: Format dates for display in emailsExample: dateTimeFormat(column("renewal_date"), "%m/%d/%y") formats as “12/15/24”divide (/)
Formula:value1 / value2Components: value1 = dividend, value2 = divisorUse Case: Calculate percentages or ratiosExample: column("closed_deals") / column("total_leads") for conversion rateendsWith()
Formula:endsWith(text, suffix)Components: text = text to check, suffix = ending text to matchUse Case: Filter records based on text endingsExample: endsWith(column("email"), ".edu") identifies educational email addressesequal (==)
Formula:value1 == value2Components: value1 and value2 = values to compareUse Case: Compare field values for conditional logicExample: column("plan_type") == "Enterprise" checks for enterprise customersgreater_than (>)
Formula:value1 > value2Components: value1 and value2 = values to compareUse Case: Compare numeric values or datesExample: column("deal_size") > 10000 identifies large dealsgreater_than_or_equal (>=)
Formula:value1 >= value2Components: value1 and value2 = values to compareUse Case: Set minimum thresholdsExample: column("lead_score") >= 80 for high-quality leadshash()
Formula:hash(string, seed)Components: string = text to hash, seed = number for randomizationUse Case: Create consistent random assignments based on user dataExample: hash(column("email"), 0) creates consistent hash for email personalizationif()
Formula:if(condition, value_if_true, value_if_false)Components: condition = boolean test, value_if_true = result when true, value_if_false = result when falseUse Case: Conditional content or calculationsExample: if(column("plan") == "Pro", "Premium Features", "Standard Features") for plan-specific messagingisEmpty()
Formula:isEmpty(value)Components: value = field or expression to testUse Case: Check for empty or null fieldsExample: isEmpty(column("phone_number")) returns true if phone is blankisNotEmpty()
Formula:isNotEmpty(value)Components: value = field or expression to testUse Case: Verify required fields have valuesExample: isNotEmpty(column("company_name")) confirms company name existsjoin()
Formula:join(separator, string1, ...string_n)Components: separator = text between values, string1, etc. = values to joinUse Case: Combine multiple values with custom separatorsExample: join(", ", column("city"), column("state")) creates “Austin, TX”length()
Formula:length(value)Components: value = text or array to measureUse Case: Count characters in text or items in listsExample: length(column("description")) returns character countlesser_than (<)
Formula:value1 < value2Components: value1 and value2 = values to compareUse Case: Find values below thresholdsExample: column("days_since_login") < 7 for recently active userslesser_than_or_equal (<=)
Formula:value1 <= value2Components: value1 and value2 = values to compareUse Case: Set maximum limitsExample: column("team_size") <= 50 for small to medium teamsmod (%)
Formula:value1 % value2Components: value1 = dividend, value2 = divisorUse Case: Create patterns or cyclesExample: hash(column("email"), 0) % 2 for even/odd splittingmultiply (*)
Formula:value1 * value2Components: value1 and value2 = numbers to multiplyUse Case: Calculate totals or scale valuesExample: column("seat_count") * column("price_per_seat") for total costnot()
Formula:not(boolean_value)Components: boolean_value = true/false expression to reverseUse Case: Invert boolean conditionsExample: not(column("unsubscribed")) to find subscribed usersnot_equal (!=)
Formula:value1 != value2Components: value1 and value2 = values to compareUse Case: Exclude specific valuesExample: column("status") != "Canceled" for active accountsnow()
Formula:now()Components: NoneUse Case: Get current date/time for calculationsExample: now() - column("created_date") for account ageor
Formula:condition1 or condition2Components: condition1 and condition2 = boolean expressionsUse Case: Create inclusive conditionsExample: column("source") == "Website" or column("source") == "Referral" for organic leadsrandint()
Formula:randint(start, end)Components: start = minimum value, end = maximum valueUse Case: Generate random numbers for testing or samplingExample: randint(1, 100) creates random number between 1 and 100replace()
Formula:replace(text, old_value, new_value)Components: text = original text, old_value = text to replace, new_value = replacement textUse Case: Clean or standardize text dataExample: replace(column("phone"), "-", "") removes dashes from phone numbersround()
Formula:round(number, digits)Components: number = value to round, digits = decimal placesUse Case: Format numeric values for displayExample: round(column("conversion_rate"), 2) shows percentage with 2 decimal placesstartsWith()
Formula:startsWith(text, prefix)Components: text = text to check, prefix = beginning text to matchUse Case: Filter records based on text beginningsExample: startsWith(column("phone"), "+1") identifies US phone numbersstringToDateTime()
Formula:stringToDateTime(time_string)Components: time_string = date in text formatUse Case: Convert text dates to datetime for calculationsExample: stringToDateTime("2024-12-31") converts text to date objectsubString()
Formula:subString(text, separator, position)Components: text = original text, separator = split character, position = which part to returnUse Case: Extract parts of text fieldsExample: subString(column("full_name"), " ", 1) extracts first namesubtract (-)
Formula:value1 - value2Components: value1 = starting value, value2 = value to subtractUse Case: Calculate differences or time spansExample: column("renewal_date") - now() for days until renewaltitle()
Formula:title(string)Components: string = text to formatUse Case: Format text with proper title caseExample: title(column("job_title")) converts “product manager” to “Product Manager”toLower()
Formula:toLower(string)Components: string = text to convertUse Case: Standardize text for comparisonsExample: toLower(column("industry")) converts all industry names to lowercasetoUpper()
Formula:toUpper(string)Components: string = text to convertUse Case: Format text for emphasis or standardizationExample: toUpper(column("state")) converts state abbreviations to uppercaseAdvanced functions
Advanced functions
Available operators
Available operators
String Operators
=oris_one_of- equal to (accepts multiple values)!=oris_not_one_of- not equal to (accepts multiple values)contains- contains (accepts multiple values)not_contains- does not contain (accepts multiple values)begins_with- begins withnot_begin_with- does not begin withends_with- ends withnot_ends_with- does not end withis_blank- blank (no arguments)is_not_blank- not blank (no arguments)
Integer/Number Operators
=oris_one_of- equal to (accepts multiple values)!=oris_not_one_of- not equal to (accepts multiple values)>orgreater_than- greater than>=orgreater_or_equal- greater than or equal to<orless_than- less than<=orlesser_or_equal- less than or equal tobetween- between (inclusive) (requires 2 values)number_not_between_includes_null- not between (requires 2 values)number_is_null- blank (no arguments)number_is_not_null- not blank (no arguments)is_zero_or_blank- zero or blank (no arguments)
Boolean Operators
is_true- true (no arguments)is_false- false (no arguments)
Date Operators
is_on- on (specific date)not_on- not on (specific date)before- beforeafter- afteron_or_before- on or beforeon_or_after- on or afterdate_between- between (inclusive) (requires 2 dates)date_not_between- not between (requires 2 dates)relative_in_past- in past (e.g., “in past 30 days”)relative_timeframe- in relative timeframe between (inclusive)date_is_null- blank (no arguments)is_not_blank- not blank (no arguments)
Note: When referencing a product event in a token formula, write the event as it is recorded in Inflection, including spaces and capital letters as relevant.
allOrgs()
Formula:allOrgs()Components: NoneUse Case: Get list of all organizations in the tenant for cross-org analysisExample: allOrgs() returns array of all organization datacountIf()
Formula:countIf("product_activity", column, operator, value, [connector, column2, operator2, value2])Components: "product_activity" = table referenced, column = field to filter, operator = comparison type, value = filter valueUse Case: Count user-specific product eventsExample: countIf("product_activity", "event_name", =, "campaign_published") counts campaigns published by userExample filtered by date: countIf("product_activity", "event_name", =, "campaign_published", and, "event_date", >=, "2025-01-01") counts campaigns published by user after January 1, 2025countIfPersonsGroup()
Formula:countIfPersonsGroup("product_activity", org_field, column, operator, value, [conditions])Components: "product_activity" = table referenced, org_field = organization identifier, column = field to filter, operator = comparison, value = filter valueUse Case: Count events across all users in an organizationExample: countIfPersonsGroup("product_activity", "User.org_id", "event_name", =, "user_login") counts all logins in workspacecountIfPersonsGroupPersonField()
Formula:countIfPersonsGroupPersonField("product_activity", column, operator, value, [conditions])Components: "product_activity" = table referenced, column = field to filter, operator = comparison, value = filter valueUse Case: Check if anyone in organization has performed an actionExample: countIfPersonsGroupPersonField("product_activity", "event_name", =, "integration_connected") checks if org has any integrationsgetMostRecentProductEventAllUsers()
Formula:getMostRecentProductEventAllUsers(event_name, [properties], [filters], time_frame)Components: event_name = product event type, properties = fields to return, filters = conditions, time_frame = days to look backUse Case: Find the latest occurrence of an event across all usersExample: getMostRecentProductEventAllUsers("campaign_published", ["campaign_name"], [], 30) gets most recent campaign published anywheregetMostRecentProductEventOrg()
Formula:getMostRecentProductEventOrg(event_name, [properties], [filters], time_frame)Components: event_name = product event type, properties = fields to return, filters = conditions, time_frame = days to look backUse Case: Find the latest event within user’s organizationExample: getMostRecentProductEventOrg("template_created", ["template_name"], [], 7) gets org’s most recent templategetMostRecentProductEventUser()
Formula:getMostRecentProductEventUser(event_name, [properties], [filters], time_frame)Components: event_name = product event type, properties = fields to return, filters = conditions, time_frame = days to look backUse Case: Find user’s most recent activity of a specific typeExample: getMostRecentProductEventUser("login", ["login_time"], [], 10) gets user’s last login detailsgetProductEventByAllUsers()
Formula:getProductEventByAllUsers(event_name, [properties], [filters], sort_field, sort_order, time_frame, limit)Components: event_name = event type, properties = fields to return, filters = conditions, sort_field = field to sort by, sort_order = asc/desc, time_frame = days, limit = max resultsUse Case: Retrieve events across all users with specific criteriaExample: getProductEventByAllUsers("campaign_created", ["campaign_name"], [], "event_date", desc, 30, 10) gets recent campaigns from all usersgetProductEventByOrg()
Formula:getProductEventByOrg(event_name, [properties], [filters], sort_field, sort_order, time_frame, limit)Components: event_name = event type, properties = fields to return, filters = conditions, sort_field = sort field, sort_order = asc/desc, time_frame = days, limit = max resultsUse Case: Get organization-specific events with sorting and filteringExample: getProductEventByOrg("user_invited", ["invitee_email"], [], "event_date", desc, 7, 5) gets recent invitations in orggetProductEventByUser()
Formula:getProductEventByUser(event_name, [properties], [filters], sort_field, sort_order, time_frame, limit)Components: event_name = event type, properties = fields to return, filters = conditions, sort_field = sort field, sort_order = asc/desc, time_frame = days, limit = max resultsUse Case: Retrieve user’s events with specific parametersExample: getProductEventByUser("template_used", ["template_name"], [], "event_date", desc, 30, 5) gets user’s recent template usageorgCount()
Formula:orgCount()Components: NoneUse Case: Count how many organizations a user belongs toExample: orgCount() returns number of orgs for multi-org userstopEventPropertyValuesAllUsers()
Formula:topEventPropertyValuesAllUsers(N, event_name, [properties], [filters], group_field, sort_order, time_frame)Components: N = number of results, event_name = event type, properties = fields to return, filters = conditions, group_field = grouping field, sort_order = asc/desc, time_frame = daysUse Case: Find top values across all users for analyticsExample: topEventPropertyValuesAllUsers(5, "page_viewed", ["page_name"], [], "page_name", desc, 30) gets most viewed pagestopEventPropertyValuesOrg()
Formula:topEventPropertyValuesOrg(N, event_name, [properties], [filters], group_field, sort_order, time_frame)Components: N = number of results, event_name = event type, properties = fields to return, filters = conditions, group_field = grouping field, sort_order = asc/desc, time_frame = daysUse Case: Identify top activity within an organizationExample: topEventPropertyValuesOrg(10, "feature_used", ["feature_name"], [], "feature_name", desc, 7) gets org’s most used featurestopEventPropertyValuesUser()
Formula:topEventPropertyValuesUser(N, event_name, [properties], [filters], group_field, sort_order, time_frame)Components: N = number of results, event_name = event type, properties = fields to return, filters = conditions, group_field = grouping field, sort_order = asc/desc, time_frame = daysUse Case: Analyze user’s top activities or preferencesExample: topEventPropertyValuesUser(3, "email_clicked", ["link_url"], [], "link_url", desc, 14) gets user’s most clicked links