Contents
The SRL Service
The SRL (Standard Response Library) service provides standard responses to help agents process interactions.
Introduction
The Agent Interaction Service API includes access to a self-learning categorization system to help agents by providing responses when they process an interaction.
The Standard Response Library (SRL) system it self-learning: it “teaches” itself with new incoming messages, according to agents’ feedback. For further information about the SRL, refer to Genesys Multi-Channel Routing documentation, which includes information about Universal Contact Server.
The following subsections detail how the SRL service interacts with the Standard Response Library database.
Standard and Suggested Responses
A standard response is a prewritten response stored in the Standard Response Library database. An agent may choose to reply to a customer with a response from the Standard Response Library. A standard response may have tags in its body that your application can automatically replace with contacts’ data.
When an agent processes an interaction, your application can display a tree of standard responses or the ones contained in the interaction’s suggested categories (if any).
The system selects this suggested categories according to categorization criteria. For details, see What Is a Category? below.
Your application can insert standard responses as replies into any e-mail or chat message, or can display them so that an agent can read them to the contact during a voice interaction.
What Is a Category?
A category is a group of standard responses and categories that are available for similar interactions. For example, a company might define a Defect category, which contains standard responses to provide when customers report a product defect. In this Defect category, this company might define a category for each product. Each category defines a set of more-specific responses for the product’s identified defects.
Your application can display categories as trees, allowing the agent to select a category and a standard response with that category. Your application can also propose an interaction’s suggested category. For instance, if an e-mail interaction has suggested categories, they are available in the interaction.mail:suggestedCategories attribute.
An agent can accept or reject the system’s choice of a selected category, in order to provide feedback to the Standard Response Library’s self-learning system.
What Is the SRL Service?
The SRL service provides your application with access to categories and standard responses stored in the Standard Response Library database. This service can be used independently from other Agent Interaction SDK (Web Services).
This chapter’s remaining sections cover the SRL service’s main features:
-
Using interfaces to standard responses and categories.
-
Providing feedback to the self-learning system.
-
Getting standard responses and categories.
-
Adding categories to an agent’s favorites.
Using Standard Responses and Categories
Your application can use the ISRLService interface to access standard responses when an agent processes an interaction. Your application can use the information retrieved by the SRL service to display categories, and standard responses, in trees.
Using Standard Response
A Standard Response is prewritten message text that your application can insert in an outgoing e-mail or chat interaction, or that your application can display for a voice interaction. This prewritten message includes variables that correspond to contact information, and also additional data such as attachments. The SRL service can replace the SRL variables with the appropriate contact information.
For each standard response, the SRL service exposes information in the srl domain:
-
srl:srlReference
—ID of a standard response; used to access a standard response information.
-
srl:name
—The name of a response.
-
srl:body
—Message text containing a response and contact variables.
-
srl:agentDesktopUsageType
—An SRLUsageType enumerated value, which indicates how to use this response.
-
srl:isActive
—true
if this response is active in the Configuration Layer.
-
srl:hasAttachement
—true if a response has attachments.
-
srl:attachments
—Attachments to a response.
Your application might have to get this information to display a standard response, or to add it into an interaction. The ISRLService interface provides some getStandardResponse*DTO() methods to retrieve standard response information in StandardResponseDTO objects.
The StandardResponseDTO class associates a standard response ID with a key-value array corresponding to srl:* attributes. Data Transfer Object
Category Information
In the SRL database, a category is composed of:
-
Its own data, such as the category name, ID, language and type.
-
A set of standard responses that belong to the category.
-
An array of its child category IDs.
Category in the SRL Service
For each category, the ISRLService interface defines a set of attributes in the srl-category domain. The following srl-category attributes characterize a category (this is a non-exhaustive list):
-
srl-category:categoryId
—system ID of a category.
-
srl-category:name
—name of a category.
-
srl-category:type
—type of a category.
Your application can retrieve the corresponding key-value pairs in SRLCategoryDTO objects. Each SRLCategoryDTO instance contains the information for a single category:
-
categoryId
—ID of the relevant category.
-
data
—The key-value array, containing the srl-category data for the relevant category.
-
srlsDTO
—An array of DTO, containing the standard responses for the relevant category.
Child Categories
The srl-category:childCategories attribute contains a category’s child categories in an array. This array, in turn, contains key-value arrays containing the attributes retrieved for the category’s child categories.
The standard responses of the child categories are not retrieved. For details, see Getting Category DTO.
Feedback and Interaction Services
Your application can use the ISRLService interface to display category information when an agent is working with interactions. For each interaction, the self-learning system can suggest categories.
The IInteractionService interface exposes the following attributes to provide access to the suggested categories:
-
interaction:categoryId
—ID of the current category assigned to an interaction by the self-learning system, or assigned manually by an agent.
-
interaction.*:addSuggestedCategories
—Adds or updates the suggested categories for this e-mail.
-
interaction.*:suggestedCategories
—An array containing the IDs of the suggested categories.
-
interaction.*:isCategoryApproved
—A boolean, whose value is 1 if an agent approves the category identified by the attribute value for an interaction or 0
, if he or she disapproves. When your application writes a value for this attribute, it provides an agent’s feedback to the self-learning system.
When an agent chooses a response in a category, he or she should be able to validate his or her choice for the self-learning system. For that, he or she has to assign the interaction:categoryId
andinteraction.*:isCategoryApproved attributes, see Category and Feedback.
Feedback |
categoryId |
isCategory
Approved |
addSuggested
Categories |
---|---|---|---|
The agent uses the
standard response of a suggested category. |
Suggested category’s ID. |
true
|
none |
There is no satisfactory category in the suggested categories. |
ID of the suggested category that has the best relevancy. |
false
|
none |
The agent uses the standard response of a non-suggested category. |
ID of the satisfactory category. |
true
|
SuggestedCategory object that contains the category’s ID and a null relevancy. |
Getting Categories and Standard Responses
The following subsections detail how to get information from the SRL service.
Getting Category DTO
Your application can get categories’ data using the getCategorieDTO() method. This method returns an array of SRLCategoryDTO objects. Your application can specify a set of category identifiers in parameters or can retrieve all the root categories of the SRL, as shown in the following code snippet.
SRLCategoryDTO[] myRootCategories = mySRLService.getCategoriesDTO( null,//To return the data of all the root categories new string[]{ // attributes to return for each category "srl-category:categoryId", "srl-category:name", "srl-category:childCategories", "srl-category:description"}, new string[]{"srl:*"}); // attributes for each Standard Response of the category
If your application requests the srl-category:childCategories attribute for each category, then the attributes specified in parameters are also retrieved for the child categories—including the srl-category:childCategories attribute.
Getting Standard Responses
Your application can retrieve the standard responses in different ways:
-
When retrieving categories, the categories’ standard responses are included in SRLCategoryDTO.srlsDTO field.
-
Your application can retrieve the srl data for a set of standard response IDs with the getStandardResponsesDTO() method.
-
Your application can retrieve the srl data for all standard responses of a particular category with the getStandardResponsesByCategoryDTO() method.
The following code snippet shows how to get the name and the description of the standard response.
StandardResponseDTO[] myResponses = mySRLService.getStandardResponsesDTO(
new string[]{"SR01"},
new string[]{"srl:name","srl:description"});
Using the getStandardResponseBody( ) Method
As presented in the previous sections, the body text of a standard response may include some code that can be replaced with contact data (for example, the name of the contact). Your application can use the getStandardResponseBody() method for this purpose, as shown in the following code snippet.
String myFilledBodyText = mySRLService.getStandardResponseBody("SR01", //ID of the response
"agent0", // ID of the agent requesting the body text
"myInteractionId"); // ID of the processed interaction
System.Console.WriteLine(myFilledBodyText);
Managing Favorites
Your application can use the SRL service to manage a list of an agent’s favorite responses. The SRL service can retrieve those favorites, add new favorites, or remove some favorites, as detailed in the following subsections.
Getting the Favorite Standard Responses
Your application can get the favorite standard responses of a set of agents, using the getStandardResponsesFavoritesDTO() method. This method retrieves all the requested attributes about the favorite standard responses for each specified agent.
The following code snippet shows how to retrieve the favorites of the agent agent0.
//Retrieving the favorites of agent
SRLUsernameDTO[] myAgentFavoritesDTO = mySRLService.getStandardResponsesFavoritesDTO(
new string[]{"agent0"}, // List of agents
new string[]{"srl:*"}); // List of attributes to get for each response
if(myAgentFavoritesDTO[0].username == "agent0")
{
StandardResponseDTO[] myFavoriteResponsesDTO = myAgentFavoritesDTO[0].srlDTO;
/// displaying agent's favorite responses
/// ...
}
Adding Standard Responses to Favorites
Your application can add new favorite standard responses using the ISRLService.addSRLFavorites() method.
To add new favorite standard responses for an agent, your application must first fill SRLform objects, as shown in the following code snippet:
/// Creating an SRL form
SRLForm mySRLForm = new SRLForm();
// Each SRLForm is used to add a response to // the favorites of an agent
mySRLForm.username = "agent0";
mySRLForm.standardResponseId = "SR01";
// Adding SR01 to the favorites of agent0
SRLFormResult[] mySRLFormResults= mySRLService.addSRLFavorites(new SRLForm[]{mySRLForm});
// Displaying the result for each standard response // that the service tried to add to the favorites of an agent.
foreach(SRLFormResult myFormResult in mySRLFormResults)
{
if( myFormResult.done == true) {
System.Console.WriteLine( myFormResult.SRLForm.standardResponseId
+" has been added to the favorites of " + myFormResult.SRLForm.username+"\n");
}
}
Removing Standard Responses from Favorites
Your application can remove favorite standard responses using the ISRLService.removeSRLFavorites() method.
To remove standard responses from the favorites, your application must first fill SRLform objects, as shown in the following code snippet:
/// Creating an SRL form
SRLForm mySRLForm = new SRLForm();
// Each SRLForm is used to remove a response from the favorites
// of an agent
mySRLForm.username = "agent0";
mySRLForm.standardResponseId = "SR01";
// Removing SR01 from the favorites of agent0
SRLFormResult[] mySRLFormResults= mySRLService.removeSRLFavorites(new SRLForm[]{mySRLForm});
//Displaying the result for each standard response
//that the service tried to remove from the favorites of an agent.
foreach(SRLFormResult myFormResult in mySRLFormResults)
{
if( myFormResult.done == true)
{
System.Console.WriteLine( myFormResult.SRLForm.standardResponseId +
" has been removed from the favorites of " + myFormResult.SRLForm.username+"\n");
}
}