Ticket | Set Ticket Omnivore URL and Omnivore Account on ticket
Use the Set Ticket Omnivore URL and Omnivore Account on ticket workflow
This workflow sets the Ticket Omnivore URL field on a ticket and associates the correct Omnivore Account record to the ticket when there is exactly one valid Omnivore Account match.
This workflow exists because ticket records should expose the Omnivore Account URL on the ticket itself [MEMORY_2], but only when there is a single clear match. If multiple URLs are possible, the workflow intentionally does not choose one automatically [MEMORY_4].
Workflow summary
- Workflow name: Ticket | Set Ticket Omnivore URL and Omnivore Account on ticket
- Object: Ticket
- Builder type: Traditional
- Status: Off
- Enrollment: Manual and automatic
- Automatic enrollment rule: Create date is known
- Re-enrollment: On
Current logic
Trigger
The workflow enrolls tickets when:
- Create date is known
This is being used as the equivalent of a ticket-created trigger in the traditional builder.
Actions
1. Delay
- Type: Delay
- Length: 1 minute
Purpose:
- Gives HubSpot time to finish attaching related records before the custom code runs
- Reduces the chance that contact/company associations are still missing at runtime
2. Custom code
- Type: Custom code
- Runtime: Node.js 20
- Secret used:
PRIVATE_APP_ACCESS_TOKEN
Purpose:
- Finds the single Omnivore Account that should be used for the ticket
- Associates that Omnivore Account to the ticket
- Writes the URL into the Ticket Omnivore URL property on the ticket
Matching logic inside custom code
The custom code checks, in practice, for Omnivore Account candidates from these places:
- Omnivore Accounts already associated to the ticket
- Omnivore Accounts associated to ticket contacts
- Omnivore Accounts associated to companies related to the ticket
- If the ticket has no company, but exactly one company is found via the ticket’s contacts, the workflow associates that company to the ticket first and then uses it as part of the lookup
Outcome rules
If exactly one Omnivore Account is found
The workflow:
- associates that Omnivore Account to the ticket
- reads the Omnivore Account record’s Omnivore URL value
- writes that value into Ticket Omnivore URL on the ticket
- returns
single_match_set
If no Omnivore Account is found
The workflow:
- does not set the ticket URL
- returns
no_match
If multiple Omnivore Accounts are found
The workflow:
- does not set the ticket URL
- does not auto-pick one
- returns
multiple_matches
If one Omnivore Account is found but its URL is blank
The workflow:
- does not set the ticket URL
- returns
single_match_missing_url
Why the workflow is designed this way
This workflow is intentionally conservative.
The ticket should only be auto-filled when there is one clear Omnivore Account match. If multiple URLs are relevant, an agent must decide which one belongs on the ticket [MEMORY_4].
This prevents the workflow from writing the wrong URL onto the ticket.
Dependencies
This workflow depends on Omnivore Account associations already existing somewhere in the record chain.
For older records, this usually means the older deal workflow must have already created or linked the Omnivore Account and pushed those relationships through the data model.
If those associations do not exist yet, this workflow may return no_match even though the business context is known by the team.
Tested behavior
A successful test on ticket 262645884408 returned:
single_match_set
Before the related historic workflow logic had been run, the same ticket returned:
no_match
This confirmed that the ticket workflow works once the upstream Omnivore Account association data exists.
Related field naming
The ticket property used by this workflow has been renamed to:
- Ticket Omnivore URL
- Property code:
omnivore_account_url
This name is preferred because it is ticket-specific and does not imply manual selection [MEMORY_3].
Important operational note
This workflow should remain aligned with the broader Omnivore data model:
- Omnivore Account holds the true single URL on the Omnivore Account record
- Ticket Omnivore URL is the ticket’s resolved URL value
- If multiple valid Omnivore Accounts exist, the workflow should not guess
Maintenance notes
If this workflow is updated later, verify these points:
- Delay still gives enough time for associations to exist at runtime
- Ticket-to-company linking via contact still works as expected
- The Omnivore Account association label on tickets is still correct
- The custom code is still writing to
omnivore_account_url - Multiple-match behavior still leaves the ticket URL blank
Plain-English summary
When a new ticket is created, this workflow waits briefly, looks across the ticket and its related records for Omnivore Account associations, and if there is exactly one valid Omnivore Account, it links that record to the ticket and fills in Ticket Omnivore URL. If there is no match or more than one match, it leaves the ticket field alone.