cancel
Showing results for 
Search instead for 
Did you mean: 

Create Business rule that changes the priority within the service call

0 Kudos
467

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?

Accepted Solutions (0)

Answers (3)

Answers (3)

wendy_snyder
Associate
Associate
0 Kudos

Hi Ruben, Download the following file example-service-call.txt and change the extension of the file from txt to json so it will look like this: example-service-call.json

On the Business Rules overview page, click on the "upload" button and select this file and upload it. Once it is uploaded, you can search for it via the rule name: SAMPLE Service Call and look how I have defined it.

You can also test it, but you would need to create the udf "customer" for the object type activity, because this SAMPLE rule has a condition with that.

Did I answer your question?

0 Kudos

Hi @wendy.snyder

Thanks so much

But i need.make into bussines rules in FSM:

wendy_snyder
Associate
Associate
0 Kudos

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
} ]
} ]