Create a business rule on the service table to attach the newly created department
ticket with a universal request.
Before you begin
Role required: admin
About this task
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.
Procedure
-
Navigate to .
-
Click New.
-
In the Name field, enter your business rule name.
-
Select your service table from the Table list.
-
Select Advanced.
-
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.
-
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()
-
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);
-
Click Update.