Contact Variables

@contact references the contact receiving the message. In most cases, this is the active contact - the person whose responses are being handled by the workflow. When using certain ActionSets that trigger new flows, @contact refers to the contact or group of contacts in the newly triggered flow while @parent.contact refers to the contact in the original flow. See Parent/Child Variables below for more details.


Each extension of the variable, e.g. @contact.name or @contact.tel, references a specific contact field. 

Example Contact Variables:

  • @contact - The full name of the contact if one is set, otherwise their number, e.g. "Jane Smith"

  • @contact.name - Also the full name of the contact if one is set, otherwise their number, e.g. "Jane Smith"

  • @contact.first_name - The first name of the contact if one is set, otherwise their number, e.g. "Jane"

  • @contact.urn.tel - The phone number of the contact in E164 format, e.g. "+14155551111"

    • @(format_urn(urns.tel)) - The phone number of the contact in a more readable format, e.g. "(415) 555 1111"

  • @contact.groups - The name and uuid for each of the groups in which the contact has been placed

    • To display only the group name or uuid, use @(extract(contact.groups[0], “name”)) or @(extract(contact.groups[0], “uuid”)). This will display only the first group in which the contact is enrolled. To display others, change 0 to 1, 2, 3, etc.

  • @contact.uuid - The universally unique identifier assigned to each contact, e.g. “96af20ed-032e-4062-b6bd-f06ece5c1fc0”

  • @contact.fields.[contact-field] - any contact fields you've created for your contacts, e.g. "@contact.fields.age"



Note: Contact fields must contain a number in order to be incremented. You can use CommunityConnect's expressions language to test a field for a value before incrementing it, e.g:

@(IF(contact.field.<field> <> "",contact.fields.<field>, 0) +1)


Field Variables

Field variables (accessed using @fields) refer to the custom contact field values of a contact. To add or remove custom contact fields, go to the “contacts” page and click “Manage Fields.” 

Here you can see which fields you have set up, how to access them using the @fields variable, what type of variable they are, and how many times each custom field has been used.


Flow Variables

Flow variables (accessed using @flow) refer to values collected at each ActionSet within a flow. Result variables (accessed using @results) only reference values collected by the flow in which they're called. This allows you to refer to previously collected values or update contact fields with a value sent by a contact.


The name of the variable will correspond with the name of the result of the ActionSet that collects it, which in the example below is “AdptiveEnroll.”


When you type @results into a step, a drop-down menu will automatically appear listing the current flow variables in the flow:


For example, we've created a flow that allows program trainers to record the name, city, and industry of interested students:


The “Wait for Response” action collects responses to the “Send Message” action ("Which city does @results.contact_name live in?" ) and saves the value as a result called "City":


The contact’s response can then be referenced using the @results. prefix:


We can also use @results.city to save a contact's city to a new contact field of the same name:


Once you’ve created a flow variable, you can additionally filter it using a variety of extensions. In the examples below, [variable-name] is a placeholder for the name of your variable.

Example Flow Variables:

  • @results - All flow variables collected to this point, e.g. "Name: Jane, Age: 32"

  • @results.[variable-name] - The value collected, e.g. @results.age will return "32"

  • @results.[variable-name].category - The name you’ve designated for the category, e.g. “Adult”

  • @results.[variable-name].input - The raw text submitted by the user, e.g. "My age is 32"

  • @results.[variable-name].created_on - The date and time when a flow value was received, e.g. "2020-01-29T12:41:52.276353Z"
    *We recommend using @(format_datetime(results.[variable-name].created_on)) to format the date in a more readable manner, e.g. “29-01-2020 01:45” (dependent on your timezone and date format settings).


Channel Variables

Channel variables (accessed using @urns) refer to the channel through which a contact receives messages. URN stands for Uniform Resource Name, a standardized identifier for a communications channel - such as a phone number or Twitter ID - that is associated with a contact. For example, if a contact sends a message to an Android channel connected to your account, the @urns variable will refer to the number assigned to that phone's SIM card.

Example Channel Variables:

  • @urns.tel - the contact’s phone number, in E164 format, e.g. "tel:+12065551212"

    • @(format_urn(contact.urn)) - the contact’s phone number, in a more readable format, e.g. "(206) 555-1212"

  • @urns.whatsapp - the contact’s What’s App number

  • @urns.mailto - the contact’s email address


If a contact does not have the specified URN attached to their contact card on the CCL platform, they will receive 


To see all channels associated with a contact, navigate to the “contacts” page and search for the desired contact. All URNs associated with the contact will be listed below their name.


Date Variables

  • @(format(now())) - The current date and time, e.g. "02-05-2014 20:08"

  • @(today()) - The current date, e.g. "02-05-2014"


Parent/Child Variables

When you use the Enter Another FlowSend a Broadcast, or Start Somebody Else in a Flow actions to start the contact in another flow from within the current flow, the flow in which the contact started is the ‘parent’ flow, while the new flow is the ‘child’ flow.


All flow variables created up to that step continue on to the next flow, becoming a 'parent' flow. Within the 'child' flow, flow variables collected in the parent are referenced using the @parent prefix. Likewise, @child can be placed in the parent flow to reference flow fields collected by the child flow up to the point the contact either finished the child flow or expired from it.


For example, if you collect a contact's age (@results.age) and location (@results.location) in FLOW A, then use the Enter a Flow action to place that contact in a new flow, FLOW B, you can reference those previously collected flow variables by calling @parent.results.age and @parent.results.location.


Note that @parent variables are only capable of referencing values from a previous flow when a contact starts a flow through either an Enter a Flow or Start Somebody Else in a Flow action.


Miscellaneous Variables

  • @webhook references variables returned from an external application via a Webhook

  • @input returns the most recent text received from the contact

  • @run variables will return information about the current run, e.g. @run.created_on will return the date and time at which the current run began


Up Next: View and Export Your Flow Results