Jump to: navigation, search

Standard Responses

This chapter covers the standard responses, handled through the Standard Response Manager.

SRL Design

Agent Interacting (Java API) includes access to a self-learning categorization system to help agents by providing responses when they process a multimedia interaction.
The Standard Response Library system is self-learning: it “teaches” itself with new incoming messages, according to agents’ feedback. For further information about the SRL, refer to Universal Contact Server (UCS) documentation.
The following subsections detail how the SRL service interacts with the Standard Response Library database.

Standard and Suggested Responses

A standard response is a pre-written 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. The provided 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 Category section below.

Your application can insert standard responses as replies into any e-mail or chat message, or it can display them so that an agent can read them to the contact during a voice interaction.

Category

A category is a group of related standard responses and categories that are available for similar interactions. For example, a company might define a Defect category, that 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 by calling the InteractionMail.getSuggestedCategories() method.

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.

SRL Manager

The SRL manager provides your application with access to categories and standard responses stored in the Standard Response Library database. This chapter’s remaining sections cover the SRL Manager’s main features:

  • Accessing standard responses and categories.
  • Managing agents’ favorites.

Using the SRL Manager

SRL Management is provided with the SRLManager interface and classes of the com.genesyslab.ail.srl package.

The SRLManager interface accesses standard responses used when an agent processes an interaction. Your application can use the information retrieved by the SRL manager to display categories, and standard responses, in trees.

To get the SRL manager, call the AilFactory.getSRLManager() method as shown in the following code snippet:

 
SRLManager mySRLManager= myAilFactory.getSRLManager();

Getting Categories and Standard Responses

As Category in the SRL Database shows, in the SRL database, a category is composed of:

  • Its own data, such as the category name, system 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 Database

Use the SRLManager interface to get a Category interface for a given system identifier. In the following code snippet, the SRLManager interface gets the Category instance corresponding to the category identifier for a multimedia interaction.

void handleInterationEvent( InteractionEvent event ) {
	 
	//....
	InteractionMultimedia mail =
		(InteractionMultimedia) event.getSource();
	 
	// ...
	// Getting the current category assigned // to the Multimedia Interaction
	String categoryID = mail.getCategoryId();
	 
	// Getting the category instance with the SRLManager
	Category myCategory = mySRLManager.getCategory(categoryID);
 
	//Displaying the category content
	System.out.println(" Category Name: "+ myCategory.getName() + 
               " Description: "+myCategory.getDescription());
	// ...
}
 

Each Category instance allows to access the standard responses and child categories assigned to the category, as shown here.

 
// Displaying the responses in this category
Collection myStandardResponses = myCategory.getStandardResponses();
Iterator itResponses = myStandardResponses.iterator();
while(itResponses.hasNext())
{
	StandardResponse myResponse = (StandardResponse) itResponses.next();
 
	System.out.println("Response Name: "+ myResponse.getName() + " Description: "+myResponse.getDescription()+”\n”);
	System.out.println("Body: "+ myResponse.getBody()+”\n”);
}
 
// Displaying the child categories
Collection myChildCategories = myCategory.getChildrenCategories() ;
Iterator itChildren = myChildCategories.iterator();
while(itChildren.hasNext())
{
	Category myChild = (Category) itChildren.next();
	System.out.println("\tChild Category Name: "+ myChild.getName() + " Description: "+myChild.getDescription());
}
 

Each category is a category tree and can belong to another category. Each child Category instance contains its own standard responses and child categories.

A category that does not belong to another category is a root category of a category tree. Call SRLManager.getCategoriesRoot() to retrieve the root categories as a collection of categories.
A standard response’s body text can include tags that you can replace with interaction and contact’s data by calling the StandardResponse.getBody() method as shown here:

 
System.out.println("Filled body text: " + myResponse.getBody(agent0, mail) );

 

Managing Agent’s Favorites

The SRLManager interface manages agents’ favorite standard responses. The SRLManager can:

  • Add a new favorite standard response for an agent by calling addStandardResponseFavorite() .
  • Get the favorite standard responses for an agent by calling getStandardResponseFavoriteIds() .
  • Remove a favorite standard response for an agent by calling removeStandardResponseFavorite() .

Handling Suggested Categories

The InteractionMultimedia interface defines all the methods handling suggested categories. The self-learning system can suggest categories for multimedia interactions, for example, incoming e-mail interactions.
When receiving an e-mail interaction, your application can check if the self-learning system suggested other categories, as shown here.

 
Map suggestedCategories = mail.getSuggestedCategories();
 

The returned Map contains category identifiers and associated relevancy.
Your application must give feedback to the self-learning system.
If the agent uses a standard response of the interaction’s suggested categories, approve this category, as shown here.
 

// Assigning one of the suggested categories to the interaction
mail.setCategoryId("myCategoryId");
// Approving the category
mail.setIsCategoryApproved(Boolean.TRUE);

 
If the agent disapproves all suggested categories for the interaction, he or she must select the suggested category with best relevancy and then disapprove it, as shown in the following snippet:
 

// Assigning the most relevant category to the interaction
mail.setCategoryId("myCategoryId");
// disapproving the category
mail.setIsCategoryApproved(Boolean.FALSE);
Important
This disapproves all the suggested categories for this interaction.

If the agent selects a standard response of a non-suggested category, he or she must add this category with a null relevancy to the suggested categories and then, approve it, as shown here.

 
HashMap mySelectedCategory = new HashMap();
mySelectedCategory.put("mySelectedCategory", null);
 
// Adding the satisfactory category
mail.addSuggestedCategories(mySelectedCategory);
 
// Assigning the satisfactory category to the interaction
mail.setCategoryId("myCategoryId");
 
// Approving the satisfactory category
mail.setIsCategoryApproved(Boolean.TRUE);

 
 
 

 

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on 7 January 2014, at 08:35.