on 2023 Sep 07 4:18 AM
Hi Team,
I need your help
Business rule that changes the priority within the service call
I want to create a business rule that changes the priority of a service call when it meets the following criteria..
Example:
1. A new field was created within the service call priority called "SUPER HIGH"
2. If I receive a service call that has "HIGH" priority
3. This service service call has type "installation"
4. I have a udf.customer in activities that contains the word "Customer VIP" on some occasions it appears with that value.
I want that when these 4 criteria are identified, they change the priority of the service call from "HIGH" to "SUPER HIGH" when found udf.customer = "Customer VIP" in a business rule.
Could you give me an example of how that business rule could be?
Request clarification before answering.
Hi Ruben, Here's a quick example I put together. Hope I understood your scenario correctly. Copy the code to a json file and then upload that to your rules and give it a try. Please keep in mind the the rule contains the udf "customer" for the object type activity in the rule conditions.
[ {
"actions" : [ {
"executionCount" : "1",
"name" : "UpdateObject",
"parameters" : {
"fields" : [ {
"name" : "priority",
"value" : "HIGH"
} ],
"objectId" : "${serviceCall.id}",
"objectType" : "SERVICECALL",
"softUpdate" : "false",
"objectVersion" : null
}
} ],
"conditions" : [ [ {
"leftOperand" : "${serviceCall.priority}",
"operator" : "==",
"rightOperand" : "'MEDIUM'"
}, {
"leftOperand" : "${serviceCall.typeCode}",
"operator" : "==",
"rightOperand" : "'-4'"
}, {
"leftOperand" : "${activity.udf.customer}",
"operator" : "==",
"rightOperand" : "'VIP Customer'"
} ] ],
"embedded" : false,
"enabled" : true,
"eventType" : "CREATE_OR_UPDATE",
"executionType" : "ON_SUCCESS",
"lastChanged" : 1694076915798,
"name" : "SAMPLE - Service Call",
"objectType" : "SERVICECALL",
"permissionsType" : "USER",
"responsible" : "example@sap.com",
"type" : "TWO",
"skippedLogs" : false,
"variables" : [ {
"name" : "activity",
"type" : "Activity",
"value" : "activity.object.objectId = ${serviceCall.id}",
"variableType" : "OBJECT",
"version" : 43
} ]
} ]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
4 | |
4 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.