User API
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_findUsers
This rule finds users by email or name in Genesys users
Input Params:
- UserValue (Required): name or email of users
Output Params:
- ErrorCode
- ErrorMessage
- Users: JSON list of users.
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.UserService.GetUsers | Description: Searches Genesys Users. Input:
Output: List<PureCloudPlatform.Client.V2.Model.User> Example:
C#
|
DCM.GenesysHelper.Services.UserService.GetUsersByUserValue | Description: Searches Users by email or name. Input:
Example:
C#
|
DCM.GenesysHelper.Services.UserService.GetUser | Description: Returns exactly one Genesys User. Input:
Output:
Example:
C#
|
DCM.GenesysHelper.Services.UserService.GetUserId | Description: Lightweight API to get the User ID from a User's Username (primary email address). Input:
Output:
Example:
C#
|