In this blog,we will discuss a specific business scenario i.e. ‘Customer service ticket routing based on the Employee Attributes’.
Prerequisite : SAP Consultant and posses technical knowledge of SAP C4C Service cloud functionalities.
Background: In a Normal Business scenario, business do have different Customer service Support teams based on the business function they performed and would like to get the correct team determined when customer service ticket is created.
For e.g.
Scenario 1: Business has different Sales team (Team SA) and different Customer Service Support Team (Team SE) where Team SE is responsible for Customer tickets and hence should be determined as ‘Service and Support Team’ even when employee assigned to sales team (Team SA) creates customer service tickets.
Scenario 2: Multiple Service Teams ,but no clear identifier to differentiate them during creation, responsible for tickets where Service and Support team is expected to identified based on the creator of the ticket during ticket creation i.e. Service Team A should be determined if Employee assigned to Team A creates ticket and similarly Service Team B should be determined when created by employee of team B.
Product Limitation : Employee Attributes could not be used in Ticket Routing Rules created for Customer Service ticket. Please refer below SAP KBA documents to provide insights of the Sales and service unit determination in SAP C4C and standard product limitation w.r.t routing rule for Customer Service Ticket.
Solution Steps
Step 1 : Go to Tickets > General Overview > Start Adaptation > Create Object data field with value type as Organisation unit.
Step 2 : Enable the Employee Service Unit field in the Ticket Quick Create Screen.
Step 3 : Custom logic to populate Employee Department to the field ‘Employee Service Unit’
import ABSL;
import AP.Common.GDT;
import AP.PC.IdentityManagement.Global;
import AP.FO.BusinessPartner.Global;
var result : DataType::OrganisationalCentreID;
var IdentityUUID = Context.GetCurrentIdentityUUID();
var Identity1 = Identity.Retrieve(IdentityUUID );
var userId = Identity1.BusinessPartnerUUID;
var employee;
var emp;
employee = Employee.Retrieve(userId);
var depart;
var queryByEmployeeBPUUID = Employee.QueryByIdentification;
var queryByEmployeeBPUUIDParameter = queryByEmployeeBPUUID.CreateSelectionParams();
if (employee.IsSet())
{
queryByEmployeeBPUUIDParameter.Add( queryByEmployeeBPUUID.UUID.content, "I", "EQ", employee.UUID.content);
var employeeQueryResult = queryByEmployeeBPUUID.Execute(queryByEmployeeBPUUIDParameter);
var EmployeeQueryResultCurrent = employeeQueryResult.GetFirst();
var assignedOrg = EmployeeQueryResultCurrent.OrganisationalUnitAssignment.GetFirst();
if (assignedOrg.IsSet())
{
var org = assignedOrg.ToRoot;
if (org.IsSet())
{
depart = org.ID;
}
}
result = depart;
}
return result;
Step 4: Create Routing rule and add field Employee Service Unit as an attribute in rule condition
Follow the path to define routing rule for customer service ticket
Sample rule based on aforementioned scenario
Some Useful Notes respective to same topic
Happy Consulting!
Cheers
Govil Banga