Unbabel is compatible with Omni-Channel, however, as per Salesforce documentation, no automations (Workflow Rules, Escalation Rules, Triggers or Flows) are fired when using Omni channel routing. This requires that a custom flow is implemented on top of the Omni channel sObject Agent Work, which based on the status we are able to know when a new case is assigned to an agent.
Alternatively we could implement a similar process using a Process or an Apex Trigger. We will describe all solutions below.
Creating a custom flow for the sObject Agent Work
You can create a record trigger flow based on the Agent Work sObject.
1 - Create a new Record-Triggered Flow
2 -Select the Agent Work Object
3 - Configure Trigger
4 - Set Entry Conditions
5 - Complete the flow start configuration
6 Add Async action
7 - Save and activate the flow
Creating a Process Builder
You can create a process builder based on the Agent Work sObject. This process builder would run when the record is edited and the following conditions are met:
- The WorkItemId field refers to a Case Id.
- The status changed to Assigned/Opened
Then you just need to call the invocable apex method: Request Case/Email Translation. NOTE: It may only be necessary to use one of the status Assigned or Opened depending on your case assignment configuration.
Example of a possible implementation:
1 - Create a new process builder for when a record changes.
2 - Select the object Agent Work and start the process when a record is created or edited.
3 - Add following criteria when conditions are met:
Add condition WorkItemId > Starts with > ID > 500
Status > Equals > Picklist > Assigned
Status > Equals > Picklist > Opened
Customize logic > 1 AND (2 OR 3)
4 - Add an immediate action and select the class: Request Case/Email Translation, then select the field caseIds and the value of WorkItemId.
5 - Finally, activate the process.
Creating a Trigger
You can use the method:
unbabelsc.UnbabelTranslationFacade.requestTranslations(List<Id> caseIds);
Then you just need to pass a list of Cases Ids that are being assigned and translations will be requested for the case description and the last email messages. The logic that we have on the process builder could be replicated here:
If AgentWork.WorkItemId is a Case Id and AgentWork.Status (new) is Assigned or Opened
- run the method above unbabelsc.UnbabelTranslationFacade.requestTranslations(List<Id> caseIds);
- An async job is queued to request translations.
- The method will only request a translation if the owner of the case is on one of Unbabel SC Permission Sets.
- If a valid input is passed like null or empty list we will throw an exception.
NOTE: It may only be necessary to use one of the status Assigned or Opened depending on your case assignment configuration.
Example:
triggerUnbabelAgentWork on AgentWork (after update) {
List<Id> caseIds = newList<Id>(); for(AgentWorkaWork : trigger.new) { if(aWork.WorkItemId.getSObjectType() == Case.SObjectType && newSet<String> {'Assigned','Opened'}.contains(aWork.Status) ) { caseIds.add(aWork.WorkItemId); } }
// The method will only request a translation if the owner of the case is on one of Unbabel SC Permission Sets. // If a null input is passed an exception will be thrown. if(!caseIds.isEmpty()) { unbabelsc.UnbabelTranslationFacade.requestTranslations(caseIds); } } |
Handling a case with Omni-Channel routing
In order to use the tool with Omni-Channel routing, after implementing the flow/apex trigger, make sure that all the necessary permissions are given to the agents handling the cases and that the Connector and Service Cloud installation and configuration are completed successfully.
1 - Login to your Salesforce environment. Navigate to a console application. In the example below, the Service Console will be the one used, although any console that features Case views is usable.
2 - Receive an email in one of your Email-to-Case addresses.
3 - A new Case will be created and routed through the Omni-Channel.
4 - An Agent can now pick up the case.
From here on, the flow follows the standard Unbabel for SF Service Cloud translation flow. (or click here for the Single Feed layout).
Comments
0 comments
Please sign in to leave a comment.