There are two ways to reference contacts and their fields within a workflow:

@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 the Send a Message to Someone Else action, @contact refers to the contact or group of contacts to which the message is being sent.

@step.contact - references the contact who sent the last message handled by the workflow. In most cases, this is also the active contact. When using the Send an SMS Response action, @step.contact and @contact are the same contact. When using the Send a Message to Someone Else action, @step.contact refers to the contact who will reach that action.

Here's an example:


Since the message created by the Send a Message to Someone Else action is being sent to Edward, @contact.first_name will be replaced with Edward's first name. @step.contact.name and @step.contact.tel will be replaced with the name and phone number of the patient that just registered via the workflow containing the Send a Message to Someone Else action.

For more information about variables, visit the Flow Variable Reference.

Did this answer your question?