About triggers and how they work

 

Triggers are business rules you define to run immediately after an event occurs within an object. For example, a trigger can be created within Housekeeping (object) to notify the housekeeper when a housekeeping work order is ready to be worked on. Another trigger could be created to then notify the inspector when the housekeeping work order has been completed by the housekeeper.

This article describes the building blocks that make triggers and explains how they run.

This article contains the following sections:

    • Essential facts for triggers
    • About triggers
    • Understanding trigger conditions and actions
    • Understanding when triggers run and fire
    • The Triggers page

    Essential facts for triggers

    Here are some essential facts for you about triggers:

    • Triggers are created from objects, events, conditions and actions. Objects are main components in then system in which you will build the trigger from: Reservations, Leads, Sales, Housekeeping, Maintenance, or Contacts. Events (required) are set in order for the trigger to know when this event occurs then do an action. Additionally, conditions (optional) can be set in order to filter the trigger further. Actions represent what will be performed when those qualifications are met.
    • Triggers will run immediately after event and conditions are met.
    • Triggers will only apply their actions if the trigger's event and conditions are met.

    About triggers

    Triggers can help you manage your workflow and improve overall satisfaction by automatically performing actions whenever an object's event occurs with specified conditions.

    Here are all available objects and some example uses for triggers:

    Contacts

    • Send email to guest services team when a contact's email address has changed.
    • Send email to contact that their phone number changed.

    Leads

    • Send email template to contact when lead is created.

    Sales

    • Send confirmation email to guest when sale is created.

    Reservations (only enabled with TRACK PM)

    • Send confirmation email to guest after reservation is confirmed.
    • Send thank you email to guest after reservation is checked-out.

    Housekeeping Work Orders (only enabled with TRACK PM)

    • Send email to housekeeper that work order is ready to worked on after guest checks out of unit.
    • Send email to inspector that housekeeper is finished cleaning and ready for them to inspect unit.

    Maintenance Work Orders (only enabled with TRACK PM)

    • Send email to vendor that scheduled date has been changed.
    • Send email to property management company that vendor has declined work order.
    • Send email to accounting team once work order status is completed.

    Understanding trigger conditions and actions

    Triggers contain conditions and actions. You combine these to create 'if' and 'then' statements (if the object contains a certain set of conditions then the actions make the desired updates to the object and sends notifications via email). You build condition and action statements using object properties, field operators, and the object property values.

    There are two types of conditions – all conditions and any conditions. The all conditions, as you've probably already figured out, must all be true. If any of the condition statements fail (are not true), the trigger will not act on the object.

    Screen_Shot_2018-05-02_at_9.51.20_AM.png

    Additionally at least one of the any conditions must also be true. For example, you might want a trigger to act only on sales that started by inbound call and inbound chat, as in this example:

    Screen_Shot_2018-05-02_at_9.54.59_AM.png

    If either of these conditions is true, the trigger will fire. If you use only one condition in the any section, it will behave like an all condition and therefore must be true for the trigger to fire.

    Action statements follow the same format, but rather than testing for conditions to be true or not, actions set ticket properties and send email notifications, as in this example:

    Screen_Shot_2018-05-02_at_10.00.32_AM.png

    Understanding when triggers run and fire

    Every time an event occurs, all of your triggers run in a cycle against that object. A trigger will fire and update the object if its events and conditions are met during the cycle. A cycle is the entire process of an object being checked against all your triggers.

    If a trigger updates an object during the cycle, the cycle starts over. All the triggers run again, except any triggers that have already fired and updated the object. This means an object could loop through the trigger list several times before all of the triggers have either updated the object or been skipped because conditions were not met.

    So a trigger might run (that is, be checked) several times during a cycle, but it will never fire (that is, take action) more than once in the same cycle because the trigger is not checked again after it fires. And a trigger will not fire at all during the cycle if the events and conditions are not met.

    The Triggers page

    All of your available triggers can be managed through the Triggers page.

    To access the Triggers page

    • Click the Configuration icon () in the header, then go under Company Setup > Triggers. The Triggers page opens:

      Screen_Shot_2018-05-02_at_9.36.51_AM.png

    From here, you can search, sort, and filter your triggers.

     

    Have more questions? Submit a request

    0 Comments

    Article is closed for comments.
    Powered by Zendesk