[+]
[+]
[-]
 [+]
  
 [+]
 [+]
  
 [+]
 [-]
   
   
   
   
   
   
   
   
   
 [+]
 [+]
 [+]
 [+]
 [+]
 [+]
 [+]
 [+]
[+]
Updated on 12/10/2019
Workflow Documentation
Events
Direct link to topic in this publication:

PREVIOUS  |  NEXT

Events

Quick Links


The Events section enables you to configure scripts to execute before, during, or following the action, and on submitting or canceling an action. You can also elect to add history records for all changes made in scripts in this section.

The Events section is only available for configuration on these action types:

Add Comment Edit Case
Approve Edit Fields
Assign Multi User Approval
Close Reject
Create Case Reminder
Custom Multi User Action Reopen

Add New Events Script

[Back to top]

Use the following steps to add a new script from the Events property configuration panel on an action:

  1. Click New Script to open the Script Editor workspace.

  2. Configure your script. See Scripts for more information on scripting.

  3. Click Save to make the script available to use with your action.

  4. Return to the Events section on the action to complete and save your configurations.

Form Events

[Back to top]

Workflow enables you to use scripts to execute custom behaviors on forms and custom actions. Only scripts of the Form Event type can be executed on forms and custom actions. We simplify choosing an appropriate script by only displaying Form Event script types when you assign scripts to the following events:

  • Before showing the form: These scripts will execute before the form displays. You can use this to prepare form fields and values, such as default values or hiding specific fields.  

  • After changing the value of custom field: These scripts will execute after a user changes the value of a custom field on the form. Scripts assigned to this event will typically hide other fields, select values, or enforce other field logic.

  • Every time the form is updated: These scripts will execute every time a change is made to the form. Scripts assigned to this event will typically hide other fields, select values, or enforce other field logic.

  • On Submit: These scripts will execute when the user clicks Submit.

  • On Cancel: These scripts will execute when the user clicks Cancel.

Note: If your script refers to an object such as a custom field, you must first add the object to the Form Designer to ensure the script will execute properly.

Use the following steps to customize these options:

  • Before showing the form

  • Every time the form is updated

  • On Submit

  • On Cancel

  1. Place your cursor in the Script Name box to display a list of available script names.

  2. Select a script from the list. Workflow adds the script to the Execution Order pane.

  3. Add additional scripts if necessary.

  4. Drag and drop the scripts to establish the desired order of execution.

  5. Click Edit to open the Script Editor, or click Remove to remove the script from the action.

  6. Configure additional options in the Event section, or click Save to update your changes.


To customize the After changing the value of custom field option:

  1. Place your cursor in the Select Custom Field field to display a list of available custom fields. The field must exist on the action’s form to properly execute.

  2. Select a custom field.

  3. Place your cursor in the Select Script field to display a list of available scripts. Select a script from the list.

    Workflow displays a table with a list of custom fields and scripts you've added.

  4. Add more custom fields and scripts if necessary.

    If more than one script is assigned to a single custom field, then you can drag and drop the scripts to establish the desired order of execution.

  5. Remove a custom field by selecting the Remove link.

  6. Edit or remove a script using the Edit and Remove links.

  7. Click Save to update the action.

Workflow Events

[Back to top]


Workflow enables you to use scripts to execute custom logic and functionality after a workflow action completes. Only scripts of the Workflow type can be assigned to this event and can be used to modify and manage data that has been updated as a result of the workflow action. We simplify choosing an appropriate script by only displaying workflow event script types when you assign scripts to this event.

To customize the After workflow action option:

  1. Place your cursor in the Script Name box to display a list of available script names.

  2. Select a script from the list. Workflow adds the script to the Execution Order pane.

  3. Add additional scripts if necessary.

  4. Drag and drop the scripts to establish the desired order of execution.

  5. Click Edit to open the Script Editor or click Remove to remove the script from the action.

  6. Configure additional options in the Event section, or click Save to update your changes.

Script History Records

[Back to top]

Workflow enables you to record the history of changes made with scripts. Case history entries are created when the following functions are performed in a script:

  • Add Comment 
  • Add User to Team
  • Close Case 
  • Reopen Case
  • Set Assignees
  • Set Case Type 
  • Set Project
  • Set Status
  • Set Unassigned

Note: Workflow only records the first and the last status for the Set Status function.
Example: If a case was initially in status A, and then changed to status B, then to C, and then to D, we only record that the case was in status A, and that it is now in status D.


To view case history records, go to the case, and click on the Case Tools > View Case History. Workflow displays a window with a list of all actions that were executed on the case.