Conversation API
API Rules within AppBase are a preconfigured framework that allows users to interact with the Genesys Conversation API more efficiently and effectively. These rules encapsulate a range of functionalities and best practices, ensuring that users can seamlessly communicate with and control the Genesys Conversation API without requiring extensive manual configuration or coding.
The Genesys Conversation API, in this context, is a powerful tool for managing and orchestrating conversations, interactions, and communication processes within the Genesys platform. It offers many features and capabilities, such as routing customer interactions to the right agents, tracking conversation histories, gathering valuable customer data, and much more.
By integrating these prebuilt API Rules into AppBase, users can easily harness the Genesys Conversation API's full potential. These rules might include predefined request and response formats, authentication mechanisms, error handling procedures, and other essential components that are essential for successful API communication.
GEN_createConversation
The rule creates email conversations in Genesys according to a configuration in Genesys Settings.
Create with input params:
- ASF.BDS.Rules.Common.RuleRequest - request of rule
- DCM.Genesys.Models.ConversationCreateRequest (see input params of rule)
- userCode - Access Subject Code of Current User
Input Params:
- QueueName (Required): Queue name in Genesys
- Provider (Required): Provider. For example, DCM
- Priority: Priority of the interaction
- SkillIds (DCM 7.1.5+): Separated comma ID of Skills. For example:
1fab838a-1a12d2f1234
,b20fc909-065f721f1234
- SkillNames (DCM 7.2+): Separated comma name of Skills.
- CustomCaseDetailUrl: If we need to open a custom case detail page instead of the default. For example, DCM Url should be in the following format (because the system shows interaction pages in embedded mode):
/Ecx.Web?pageCode={params of page}
- Subject
- ToAddress
- ToName
- FromAddress
- FromName
Output
- ConversationId: Id of the created email interaction
- ErrorCode
- ErrorMessage
- SuccessResponse
GEN_disconnectConversation
Rule sends the active participants to the Disconnected state
Input Params:
- ConversationId (Required): Id of the conversation.
Output
- ErrorCode
- ErrorMessage
- SuccessResponse
GEN_transferToQueue
Rule transfers conversation to queue
Input Params:
- ConversationId (Required): Id of the conversation.
- QueueId (Required): Id of the queue.
Output
- ErrorCode
- ErrorMessage
- SuccessResponse
GEN_assignToUser
Rule assigns conversation to the user.
Input Params:
- ConversationId (Required): Id of the conversation.
- UserId (Required): Id of the user.
Output
- ErrorCode
- ErrorMessage
- SuccessResponse
GEN_getConversationJson
This rule returns the conversation in JSON.
Input Params:
- ConversationId (Required): Id of the conversation.
Output
- ErrorCode
- ErrorMessage
- Result: JSON of conversation
Methods in Extensions
Before executing these methods, you should init auth token:
using DCM.GenesysHelper.Services;
string pureCloudUrl = ConfigurationManager.AppSettings.Get("PURECLOUD_URL");
string clientId = ConfigurationManager.AppSettings.Get("PURECLOUD_CLIENTID");
string clientSecretId = ConfigurationManager.AppSettings.Get("PURECLOUD_CLIENTSERCRETID");
int regionHost = DcmConvertHelper.SafeObjectToInt(ConfigurationManager.AppSettings.Get("PURECLOUD_REGIONHOST"));
AuthService authService = new AuthService();
authService.SetAuthToken(pureCloudUrl, clientId, clientSecretId, (PureCloudRegionHosts)regionHost);
How to get debug enabled flag. Debug data will be available in Conversation History (if we have ConversationId) or the system monitor.
string result = request.AsString("GEN_ADVANCED_LOGGING");
bool isDebugEnabled = result == "1";
Method | Definitions |
---|---|
DCM.GenesysHelper.Services.ConversationService.Get | Description: Returns basic information about an existing Genesys Conversation. Input:
Output:
Example:
C#
|
DCM.GenesysHelper.Services.ConversationService.Get | Description: Simplified search Conversations in Genesys by IDs. Input:
Output:
Example:
C#
|
DCM.GenesysHelper.Services.ConversationService.Assign | Description: Attempts to manually assign a specified conversation to a specified user. Ignores bullseye ring, PAR score, skills, and languages. Input:
Output:
Example:
C#
|
DCM.GenesysHelper.Services.ConversationService.TransferToQueue | Description: Attempts to manually assign a specified conversation to a specified queue. Input:
Example:
C#
|
DCM.GenesysHelper.Services.ConversationService.SetWrapUpCode | Description: Sets the Wrap-Up Code for a specific Participant in a Conversation. It's important to understand that a Conversation will have a Wrap-Up Code for User involved in the Conversation. Input:
Example:
C#
|
DCM.GenesysHelper.Services.ConversationService.SetWrapUpCodeAndDisconnect | Description: Sets the Wrap-Up Code for a specific Participant in a Conversation. It's important to understand that a Conversation will have a Wrap-Up Code for User involved in the Conversation. Input:
Example:
C#
|
DCM.GenesysHelper.Services.ConversationService.GetConversationState | Description: Returns the overall state of the Conversation. Values can be:
Input:
Output:
Example:
C#
|