How to Use Merge Fields and Dynamic Variables in HappyFox Workflows

By Harinarayanan V 2 views

This article explains how merge fields work in HappyFox Workflows, how to insert them into action configurations, how to reference output variables from earlier steps, and how to diagnose empty or unexpected values at runtime.


What Are Merge Fields

Merge fields are dynamic placeholders you insert into action fields. When a workflow runs, HappyFox Workflows replaces each merge field with the actual value from the trigger event or a prior action step. You can use merge fields in any action field that accepts free text or a variable input — such as the message body of an Add Reply, the subject of a Send Email, or a mapped field in an integration action.

For example, instead of writing a fixed reply that says "Hi there," you can insert the Contact Name merge field so the reply opens with the contact's actual name pulled from the triggering ticket.


How Merge Fields Are Organised

When you open the merge field picker, the available fields are grouped by workflow step — not by field category. Each group is labelled with the step number and name as it appears in your workflow builder, for example:

This means the fields available to any given action depend directly on what steps precede it in the workflow. A step can only reference merge fields from the trigger or from steps that run before it.

Note: Use the Search field at the top of the picker to find a specific field by name rather than scrolling through each step group. The picker also includes a Refresh button — click it if you have recently made changes to your workflow steps and the new outputs are not yet visible.


Two Types of Merge Field Inputs

Depending on the action field you are configuring, merge fields behave in one of two ways.

Free-text fields (such as message body or email subject) accept merge fields as inline chips. The field renders the inserted value as a labelled token — for example, a chip labelled Contact Name with a small badge showing the source step number. Multiple merge fields can be mixed with static text in the same field.

Structured fields (such as Ticket ID or Priority) accept a single merge field as the entire field value. These fields show a Select [Field Name] placeholder and do not accept free text. You select one output variable from a prior step to populate the field.


How to Insert a Merge Field

  1. Open the action you want to configure in the workflow builder.
  2. Locate the field where you want to insert a dynamic value. Click + Insert Merge Fields next to that field label.
  3. In the Insert Merge Fields panel, expand the step group that contains the value you need.
  4. Click the field name to insert it. The panel closes and the merge field appears in the action field as a named chip or token.
  5. Repeat for any additional fields in the same action.
  6. Click Preview in the action panel header to verify the configuration before saving.

Note: The Preview option shows the action configuration with sample values populated from the most recent test run. If no test run exists, field values appear as empty placeholders.


How to Reference Action Output Variables

When an earlier action in your workflow produces output — for example, a Lookup Table action returns a matched value, or a Set Status action updates a ticket — those outputs become available as merge fields for all subsequent steps.

To use an action's output in a later step:

  1. Open the later action and click + Insert Merge Fields on the field you want to populate.
  2. In the picker, locate the group labelled with the earlier action's step number and name (for example, 3. Set Status).
  3. Expand the group. You will see the fields that action returned — such as Id, Subject, Timestamp, and Display Id.
  4. Click the field you want to pass into the current action.

Note: If the earlier action's step group does not appear in the picker, click Refresh. This is expected after adding or reordering steps.


Why a Merge Field May Show an Empty Value at Runtime

If a workflow runs but a merge field produces no value in the output, the most common causes are:

The field was not populated on the triggering ticket. The merge field picker shows all fields that exist in your HappyFox Help Desk account, whether or not they are filled in on any given ticket. If the trigger ticket does not have a value for that field, the merge field resolves to empty.

The field was renamed after the workflow was built. When a custom field is renamed in HappyFox Help Desk, any merge field references in existing workflows that relied on the original field name will no longer resolve. You need to open the affected actions, remove the stale merge field, and re-insert the field from the picker under its new name.

The merge field references output from a step that did not run. If a prior step was skipped due to a condition not being met, its outputs are not available. Steps that run conditionally may produce no output for certain tickets.


How to Check Merge Field Values at Runtime Using Run History

When a workflow runs, HappyFox Workflows logs the input and output data for each step in Run History. You can use this to confirm exactly what value a merge field resolved to — or to identify why it was empty.

  1. Navigate to Run History in HappyFox Workflows.
  2. Locate the workflow run you want to inspect and click on it.
  3. Select the step you want to examine.
  4. Review the Data In panel — this shows the values that were passed into the step's fields at the time it ran, including all resolved merge fields.
  5. Review the Data Out panel — this shows the output values the step produced, which are available as merge fields to subsequent steps.

If a merge field resolved to empty, the Data In panel will show the field with a blank or null value. This confirms the issue is with the source data, not the workflow configuration.

Note: If the Data In panel shows the expected value but the action output (such as a sent message) does not reflect it, check whether the action completed successfully. A failed step may have used the correct inputs but not executed. See  How to Use Run History to Debug Workflow Issues for guidance on reading step statuses.


If a Merge Field Appears as Raw Text in the Output

If the output of a workflow action shows a merge field label as literal text rather than a resolved value — for example, a reply that reads "Hi Contact Name" instead of "Hi Sarah" — check the following:

 


Next Steps

Your merge fields are now configured and will resolve to live values each time the workflow runs. To validate the output of specific steps and trace unexpected values, see How to Use Run History to Debug Workflow Issues. To extract a specific value from a text field and pass it to a later step, see How to Use the Extract Values from Text Action in HappyFox Workflows.