Create a business rule for your service

  • Freigeben Version: Australia
  • Aktualisiert 12. März 2026
  • 1 Minute Lesedauer
  • Create a business rule on the service table to attach the newly created department ticket with a universal request.

    Vorbereitungen

    Role required: admin

    Warum und wann dieser Vorgang ausgeführt wird

    You can create a business rule for your service for any of the following reasons.
    • Provide a unified and simplified ticketing experience for your requester by configuring UR creation from all channels.
    • Enable agents to transfer the primary ticket to other departments if the original request was initially sent to the wrong department by the requester.
    • Facilitate cross-departmental reporting on the overall SLA if the ticket is transferred between departments.

    Prozedur

    1. Navigate to All > System Definition > Business Rules.
    2. Click New.
    3. In the Name field, enter your business rule name.
    4. Select your service table from the Table list.
    5. Select Advanced.
    6. On the When to run tab, in the When condition select after and select the insert check box.
      This action specifies that the business rules should run after the insert or update.
    7. On the Advanced tab, add your condition.
      For example, add the below condition in the Condition field.

      !current.universal_request.nil() && current.universal_request.primary_task.nil()

    8. Enter the script in the Script field that you want to run when the defined condition is true.
      For example, add the below script to attach the service ticket as a primary ticket for UR.

      (function executeRule(current, previous /*null when async*/) { var urUtilsApi = new sn_uni_req.UniversalRequestUtils(); urUtilsApi.attachPrimaryTicket(current.universal_request, current.getUniqueValue(),null,true); })(current, previous);

    9. Click Update.
      For more information on other fields of this form, see Create a business rule.