Skip to main content
Skip table of contents

External Contact APIs

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.


Methods in Extensions

Before executing these methods, you should init auth token:

C#
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.

C#
string result = request.AsString("GEN_ADVANCED_LOGGING");
bool isDebugEnabled = result == "1";


MethodDefinitions

DCM.GenesysHelper.Services.ExternalContactService.Get

Description: Returns exactly one External Contact.

Input:

  • extContactId: string
  • isDebugEnabled: bool, default = false

Output:

  • PureCloudPlatform.Client.V2.Model.ExternalContact

Example:

C#
using DCM.GenesysHelper.Services;  
 
string contactId = "";
var result = ExternalContactService().Get(contactId);

DCM.GenesysHelper.Services.ExternalContactService.GetAll

Description: Searches all External Contacts. The existing Genesys API can only search across all fields..

Input:

  • pageSize: int, default = 100,

  • pageNumber: int, default = 1,

  • query: string

  • sortOrder: string,

  • expand: List<string>

  • isDebugEnabled: bool, default = false

Output:

  • List<PureCloudPlatform.Client.V2.Model.ExternalContact>

Example:

C#
using DCM.GenesysHelper.Services;  
 
var result = ExternalContactService().GetAll();

DCM.GenesysHelper.Services.ExternalContactService.UpdateContact

Description: Updates an existing External Contact.

Input:

  • extContactId: string

  • contactData: ExternalContact  (see PureCloudPlatform.Client.V2.Model.ExternalContact)

  • isDebugEnabled: bool, default = false

Output:

  • PureCloudPlatform.Client.V2.Model.ExternalContact

Example:

C#
using DCM.GenesysHelper.Services;  
 
string extContactId = ""
var contactData = new ExternalContact(); //fill all field or Get data and change something
var result = ExternalContactService().UpdateContact(extContactId,contactData);


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.