Using custom objects in triggers and views

Plan requirement

Subscription Suite Team or higher, Support Enterprise
Access Admin

Business rules can act on the record a ticket points at, which is how a contract type ends up driving your routing.

Use one in a rule

  1. Make sure the ticket has a lookup relationship field pointing at the object. Without it there is nothing for a rule to read.
  2. In Admin Center, click Objects and rules and open Business rules > Triggers, or the view you are building.
  3. Click Add condition. In the Category dropdown, pick the lookup field itself, or step into it and pick a field of the related record. Set the operator and the value.
  4. Test on a ticket where the relationship is filled in.

One limit to design around: a lookup relationship field can only be used in notification actions. Reading the related record to decide something works; writing to it does not.

And a custom object that a trigger refers to cannot be deleted while that trigger exists, which is a useful brake rather than an obstacle.

What this unlocks

  • Routing by contract type, without duplicating that on every ticket.
  • Service levels from the record, so a premium contract gets premium targets automatically.
  • Views per product line, based on what the record says rather than what someone typed.

The data lives in one place. Change a contract's tier and every future ticket follows, with no rule to edit.

The relationship must be set

A rule reading a related record does nothing when the lookup field is empty. That is the usual reason a carefully built rule works on some tickets and not others.

Filling it reliably is upstream work: a rule that sets it from the requester's organisation, or a required field on the form.

Reporting is more limited

Explore does not report on related object fields as freely as it does on the ticket's own. Where you know you will need a breakdown by something on the record, consider also writing that value onto the ticket as a field, set by a trigger. Slightly redundant, and considerably easier to report on.

See also

Was this article helpful?

0

Still stuck?

Our support team will take a look with you.

Comments

0 comments

Article is closed for comments.