Adding and Updating a Contact Field
When a contact field is created, its default value is null unless the field is imported with a pre-existing value. To change the value of a recently created contact field, use this action or edit the value on the contact's profile.
For example, when a new phone number sends a message to a channel connected to your account, a new contact is created with a null Name value and null values for every contact field you've added. The new contact can only be identified by their phone number until their other field values are updated.
Use the Update the Contact action to update the value of an existing contact field for each contact that reaches this node.
Using Variables & Expressions
Contact fields can be updated with a fixed value, expressions, or variables:
-
@results - the variable assigned to the result of each Split Action node. May also include .value (e.g. @results.[variable_name].value, the value of the incoming message sent by the contact), .category (e.g. @results.[variable_name].category, the category the incoming message sent by the contact passed through) or .created_on (e.g. @results.[variable_name].created_on, the time the incoming message was received from the contact).
-
@urns - the addresses for the contact (@urns.tel, @urns.facebook, @urns.mailto).
-
@input - the last message handled by the workflow (@input.text is the text of the last message, @input.channel is the channel the last message was handled on, etc.).
-
@webhook - the parsed JSON payload of the last webhook call.
-
An expression, e.g. @(now()), @(datetime_add), @(remove_first_word) and many more.
-
@parent - references variables collected by a parent flow.
-
@child - references variables collected by a child flow.
Creating a New Contact Field
To create a new contact field, type its name into the Field box and press Return. In the example below, we've typed Dorm Room. The new field will then appear under Fields on the contact's page.

The new field can be referenced with @fields.[variable_name]. It's created with "Text" as its data type, so it expects to store text. If the field will store a number or a date and time, change its type on your Manage fields page: find the field name and click it to edit it.
You can also manually create and edit a custom contact field that isn't one of the default fields by following the directions here.
Updating a Contact Field
In the example below, our Advisor Meeting flow updates a custom contact field, Next Advisor Meeting, using the @results.meeting_date variable.

After sending a message asking when the student's next advisor meeting is, we collect their response with a Wait for Response action and enter Meeting Date in the Save the result as box:

Next, we save the response with the Update the Contact action in a new node, connected to the Has Date category.
In the node's Field box, you can either choose an existing custom contact field or type a new field's name to create it. For this example, we'll choose the Next Advisor Meeting field and set its value to @results.meeting_date, which uses the name we gave the result in the previous Wait for Response node.

The contact's next advisor meeting date is now saved to their contact information. To see it, go to the contact's page and look under Fields:

| Note: A single contact field can store up to 640 characters. |
Incrementing Numeric Values
Contact fields must contain a number in order to be incremented. You can use our expressions language to test a field for a value before incrementing it, e.g.:
@(default(fields.age, 0) + 1)