Use related record conditions in workflow branches

Updated

Who can do this: Super Admins, Creators and Integrators

Make a workflow branch depend on records related to the trigger record, not only on the trigger record's own fields. For example, match a deal only when at least one of its line items has a given product code.

Workflows are available when they're turned on for your organization. If you don't see Workflows in the menu, contact your OnRamp team. Related record conditions are turned on separately. If you don't see Add related record condition while editing a condition, contact your OnRamp team.

Before you begin

  • Related record conditions are on every card that has numbered conditions: the playbook card, Add Modules Conditionally and Project Owner. The Default or unmatched condition and the trigger's own conditions don't have them.

  • The workflow's CRM connection must be working, so OnRamp can list the trigger object's related objects and their fields.

  • A published workflow is read-only. You make this change in a draft.

  1. Go to Workflows and open the workflow.

  2. Select Edit from v<N> to start a draft.

  3. In the flow, select the card, then find the condition to change, for example Condition 1.

  4. Under Related record conditions, select Add related record condition.

  5. Choose how many related records must match: At least one, None or All.

  6. Under Choose a related object, choose the related object.

  7. Optional: for a HubSpot relationship that carries association labels, an association label box appears. Enter the label the related record must have, or leave it empty to accept any label.

  8. Add field conditions for the related object. With no field conditions, any related record of that object counts.

  9. Select Save.

  10. Select Publish.

How the condition is evaluated

Choice

The condition is met when

At least one

One or more related records match the field conditions.

None

No related record matches the field conditions. This includes a trigger record with no related records.

All

Every related record matches the field conditions, and there is at least one related record.

A related record matches only when it meets all of its field conditions. With no field conditions, All works like At least one: the trigger record needs one or more related records.

A condition can have both field conditions on the trigger record and related record conditions.

If the trigger object changes

A related record condition is built for one trigger object. If you change the workflow's trigger to another object, the condition shows a warning that it was built for the earlier object. Choose a related object of the new trigger object, or remove the condition. The card stays incomplete until you do.

If you can't edit a saved condition

If a condition shows "Related record conditions can't be edited in your organization yet. Saved ones still run, and you can remove them.", the feature isn't turned on for your organization. The saved condition still applies to runs. You can remove it with the trash icon, but you can't change it.

More in Triggers & conditions