Vlocity Facts #50 || Call a Decision Matrix from an Integration Procedure

In previous post we have used Integration procedure as REST API.
In salesforce we use Assignment rules to assign cases to particular queues. In this post we will assign case to queues by using decision matrix.

For this example I'm going to use below mentioned json.
{

    "accountDetails": {
        "FirstName""Community",
        "LastName""User6",
        "Email""@gmail.com",
        "DateOfBirth""1999-12-12",
        "Premium""Yes",
        "Partner""Gold"
    },
    "caseDetails": {
        "Subject""Performance Issue",
        "Description""While I'm playing game it is getting over heated",
        "Type""Laptop",
        "Priority""High",
        "Mobile Number""999999999",
        "SIDN""9999",
        "CaseReason""Performance"
    }
}

Follow these Steps to implement the use case:
1. Navigate to Business Rule Engine from app launcher, select look up tables and create new look up table by selecting "Decision Matrix".

2. Fill the required details in the next screen by selecting type as 'Standard'.
3. Once decision matrix has been created navigate to related tab and open the version which has been created by salesforce.
4. Add the columns or if you have csv file as well you can upload.
Note: Based on multiple input options single output will be given in the response.
Create csv file in that way.
5. Once you click on "Add Column" button you need to enter the column header, Header type whether it is input or output and data type.
6. After adding columns now add rows.

Note: In QueueName I have added api names of the queues which I have created in salesforce.
7. Activate the version by mentioning the start and end date.
------------------------------------------------------------------------------------------------------------------------
Now navigate to Integration procedure which we have created in previous post and create new version.
Using Integration Procedure as Rest API
After "ErrorHandlingResponse" set value drag and drop decision matrix action and select recently created decision matrix by passing input values.

In below screen shots you can observe, I'm passing the priority value to the decision matrix and getting queue name based on what we have mentioned in input and output columns.
By using Data Mapper extract get the queue Id and assign that Id to owner field of the case record.
By using DataMapper post I'm updating the owner field of the case record.

Note: In this integration procedure I'm assigning milestone assignment as well by using decision matrix.
-------------------------------------------------------------------------------------------------------------------
Decision Matrix: 

Decision Matrix Action:
Debug request/response:
Passing MileStoneAssignment response to DataMapper Post
DataMapper post Mapping:
--------------------------------------------------------------------------------
To add on :-  We can use lookup table type instead of decision matrix if we need multiple outputs based on some custom logic.

In conclusion: 
We leveraged OmniStudio Integration Procedures and DataRaptors to expose Salesforce to third-party applications, successfully creating records in Salesforce, such as Accounts, Users, and Cases—without the need for Apex code. With the addition of a Decision Matrix, we eliminated dependency on Salesforce Assignment Rules, ensuring that Cases are automatically routed to the appropriate queues and milestones.

One more use case where we can use decision matrix:  How to use Decision Matrix in OmniScript




 













Comments

Popular posts from this blog

Vlocity Facts #01 | OmniStudio DataRaptors

Vlocity Facts #44 || Communication between Omniscript and Flexcard [Pub/Sub]

Vlocity Facts #45 || Pop-Up Screen and Navigating to the Next Step in Omniscript by using LWC