Global variables: contact, conversation, trigger, execution
The data Omnifox injects into every workflow, grouped into $contact, $conversation, $trigger, and $execution, with their fields and usage examples.
Watch this step in the video · Variables
What it is and when to use it
Global variables are the data Omnifox injects automatically into every workflow run, without you having to define them. They come grouped into "namespaces" by what they describe: the contact, the conversation, the trigger, and the run itself. You use them to personalize messages and build requests, and you'll find them ready in the editor's Variables panel.
This article covers the four main groups: contact, conversation, trigger, and execution. Remember the syntax: {{$group.field}}.
$contact — the contact
Data about the person you're talking to:
{{$contact.id}}·{{$contact.first_name}}·{{$contact.last_name}}·{{$contact.display_name}}{{$contact.email}}·{{$contact.phone}}{{$contact.company}}·{{$contact.job_title}}{{$contact.city}}·{{$contact.country}}·{{$contact.language}}
Note:
{{$contact.timezone}}exists but currently resolves to empty (there's no reliable per-contact timezone source yet).
$conversation — the conversation
Data about the thread that triggered (or that the workflow touches):
{{$conversation.id}}·{{$conversation.status}}·{{$conversation.priority}}{{$conversation.channel_id}}·{{$conversation.channel_type}}·{{$conversation.channel_name}}{{$conversation.assignee}}(assigned agent) ·{{$conversation.assignee_team}}(team){{$conversation.unread_count}}·{{$conversation.last_customer_message_at}}·{{$conversation.last_agent_message_at}}
When the trigger is the conversation close, metrics are added such as {{$conversation.first_response_time}}, {{$conversation.resolution_time}}, {{$conversation.incoming_messages_count}}, and {{$conversation.outgoing_messages_count}}.
$trigger — the trigger
These variables depend on the trigger that starts the workflow: each event exposes its own fields. That's why the Variables panel shows the ones for the trigger you chose. Some examples:
- Deal won / stalled (CRM):
{{$trigger.title}},{{$trigger.amount}},{{$trigger.deal_id}},{{$trigger.days_inactive}}. - Change in a board column:
{{$trigger.column_old}},{{$trigger.column_new}},{{$trigger.column_id}}. - Mention in Team:
{{$trigger.text}},{{$trigger.by_user_name}}.
Check the panel to see exactly what your trigger carries before using them.
$execution — the run
Identifies the current workflow run:
{{$execution.id}}— the ID of this run.
Very handy for correlation: for example, send workflow_execution_id: {{$execution.id}} in an HTTP request body so the external system knows which run it came from.
Other useful groups
{{$now.hour}},{{$now.day_of_week}}(1=Monday … 7=Sunday),{{$now.date}},{{$now.time}},{{$now.iso}},{{$now.is_weekend}},{{$now.is_business_hours}}.{{$user.name}},{{$user.email}}— the assigned agent.{{$workspace.name}},{{$organization.name}},{{$organization.plan}}.
Verification
Run a Test run with a real conversation and check the resulting message in the timeline: confirm each {{$...}} comes out with its value.
If it doesn't work
- A
$triggervariable comes out empty: that field isn't exposed by your trigger. Open the Variables panel and use only the ones listed for that trigger. $conversation.*comes out empty: the trigger isn't a chat one (for example a CRM event with no associated conversation).$contact.timezonealways empty: that's expected, there's no timezone source today.
Tips
- For webhooks,
{{$now.iso}}already comes in ISO-8601 format with Z (UTC), ready to embed. - If you need
06instead of6, use the_paddedsuffix variants (for example{{$now.hour_padded}}).
Related articles
Related articles
-
Build your first workflow
Omnifox workflows automate your operation: a trigger starts the automation and action nodes do the work. Build a welcome message in minutes.
-
Workflow triggers catalog
Learn which events can start a workflow automatically in Omnifox.
-
Workflows complete guide
Workflows in depth, in 54 chapters: triggers, nodes, variables, testing, history, templates, import and export, with every setting explained and a real workflow end to end.
-
Action nodes available in workflows
Discover the actions a workflow can run automatically.
-
Conditions and branching (if/then) in a workflow
Make your flows take decisions and follow different paths based on each contact data.