Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Genesys CX Cloud with Salesforce Voice - Reuse same credentials with managed package

    Posted 2 days ago

    Hi everyone,

    We are currently using  Genesys Cloud CX with Salesforce Voice in our org.

    I am extending the integration with some custom Apex logic to handle bi-directional syncing of ACW (After Call Work) time. Specifically, I have an Apex class that makes REST calls to the Genesys Platform API (/api/v2/conversations/...) to update wrap-up codes and fetch durations.

    To get this working, I set up a custom Named Credential and External Credential in Salesforce to handle the authentication for my Apex callouts.

    My Assumption & Question: I understand the Genesys Managed Package likely maintains two types of connections:

    1. Client-Side: The user session for the Softphone/CTI (User Context).

    2. Server-Side: A background connection used for syncing call logs/tasks to Salesforce (System/Integration Context).

    Is it possible to "reuse" one of those existing connection established by the Managed Package for those callouts to close the ACW?

    Or is the package's authentication strictly isolated in its namespace, requiring us to maintain this parallel Named Credential for our custom logic? Or could the users session be used for those callouts?

    I want to ensure I'm following best practices and not creating redundant connections if the managed package exposes a global method or token for this purpose.



    Context (Code Snippet):
    Here is a simplified version of the callout logic I am using:

    Java
    // Current approach: Uses a custom Named Credential 'GenesysCloudAPI'
    private static AgentContext getAgentContext(String conversationId) {
        HttpRequest req = new HttpRequest();
        // Is there a way to use the Managed Package auth instead of this custom named cred?
        req.setEndpoint('callout:GenesysCloudAPI/api/v2/conversations/' + conversationId);
        req.setMethod('GET');
        
        Http http = new Http();
        HttpResponse res = http.send(req);
        // ... processing logic
    }
    

    Any advice on the recommended architecture for extending the integration would be appreciated!

    Thanks


    #Integrations
    #PlatformAPI

    ------------------------------
    Mario Zoske
    n/a
    ------------------------------


  • 2.  RE: Genesys CX Cloud with Salesforce Voice - Reuse same credentials with managed package

    Posted 2 days ago

    Maybe to add to this: Instead of using the same credentials, maybe the user session can be adopted and used that already exists.



    ------------------------------
    Mario Zoske
    n/a
    ------------------------------