Genesys Cloud - Developer Community!

Β View Only

Sign Up

  • 1.  Need help with setting up embeddable framework with SAP C4C

    Posted 2 days ago

    Hi,

    Pretty much what the title says. We have created the framework.js file and uploaded it. We are passing the URL in to C4C, but when the user logs in, we get "Connection to the CRM System could not be established".

    I'm not sure where to go from here! Has anyone got experience with this? I'm pretty sure I'm close, and it's gonna be something silly, but....

    TIA


    #EmbeddableFramework

    ------------------------------
    Paul Simpson
    Views expressed are my own and do not necessarily reflect those of my employer.
    ------------------------------


  • 2.  RE: Need help with setting up embeddable framework with SAP C4C

    Posted 20 hours ago

    Hi Paul,

    That error usually points to a configuration or connectivity issue rather than the framework itself πŸ‘

    A few things to double-check:

    • Framework URL accessibility: Make sure the framework.js URL is publicly reachable (no auth, no VPN restrictions).
    • CORS settings: Verify your hosting allows requests from the SAP C4C domain.
    • HTTPS: Ensure everything is served over HTTPS (C4C requires secure endpoints).
    • Genesys Cloud org/region config in your framework: a mismatch here can prevent initialization.
    • Browser console logs: Often you'll see more specific errors (CORS, 404, cert issues, etc.).

    In most cases, this error ends up being either CORS or the URL not being reachable from the client environment.

    Best regards,

    Cesar



    ------------------------------
    Cesar Padilla
    INDRA COLOMBIA
    ------------------------------



  • 3.  RE: Need help with setting up embeddable framework with SAP C4C

    Posted 20 hours ago

    Hey Cesar!

    We are serving framework.js directly from Genesys Cloud and it appears to being delivered without issue. One minor issue I have is that of HTML requirements. It would seem to me that there needs to be something to load inside the widget that in turn loads Framework. Is this automatically created on the fly by Genesys, or do we need to do it? (If we need to do it, where do we host that? The docs say that an additional host should not be required.)

    My current thinking is to cut the framework right down to the bare minimum (with no CRM calls) to see if the call controls then show up. Then work from there.

    I'm thinking CORS as well, but it's hard to determine on which leg. The console logs are not clear (since they also include all the junk from the host application.)

    One thing I am not clear on is the path of the data. When the Widget attempts to communicate with the CRM, does it do so directly from the client machine, or do the requests go via Genesys Cloud? If it's the latter, then it may be that we need to configure the firewall / CRM to allow Genesys to make an inbound request.

    I could really use some clear architecture diagrams at the moment. (This is something I need to present to the client anyway.) Do you (or anyone else reading this) have any?

    Thanks.



    ------------------------------
    Paul Simpson
    Views expressed are my own and do not necessarily reflect those of my employer.
    ------------------------------



  • 4.  RE: Need help with setting up embeddable framework with SAP C4C

    Posted 19 hours ago

    Hi Paul,

    Great follow-up - you're definitely on the right track πŸ‘

    A few key points that should help clarify things:

    βœ… 1. Do you need to host an HTML page?

    No - you don't need to host an additional HTML page.
    When using the Embeddable Framework, Genesys Cloud loads the UI container automatically, and your framework.js is injected into that context. So your assumption is correct: nothing extra needs to be hosted.


    βœ… 2. Communication path (important)

    All CRM communication is done directly from the agent's browser, not via Genesys Cloud.

    So the flow is:

    Agent Browser ↔ SAP C4C
    Agent Browser ↔ Genesys Cloud
    

    πŸ‘‰ This means:

    • Any CRM API calls originate from the client side
    • CORS must be allowed on the SAP side
    • No need to open inbound access from Genesys Cloud to your CRM

    βœ… 3. Likely root cause

    Given what you described, the error:

    "Connection to the CRM System could not be established"

    is most commonly caused by:

    • CORS blocking calls from the browser to SAP C4C
    • CRM endpoint not accessible from the user network
    • Missing/incorrect authentication headers in CRM calls

    βœ… 4. Your debugging approach πŸ‘

    Stripping the framework down to a bare minimum is exactly the right move:

    • First confirm the widget loads and call controls appear
    • Then incrementally add CRM logic

    βœ… 5. Practical debugging tip

    In DevTools:

    • Filter by XHR / Fetch
    • Look specifically for failed calls to C4C
    • CORS errors will usually show clearly there (even if console is noisy)

    If I had to bet based on your description, I'd double down on:

    CORS configuration on SAP C4C for the agent's browser origin



    ------------------------------
    Cesar Padilla
    INDRA COLOMBIA
    ------------------------------



  • 5.  RE: Need help with setting up embeddable framework with SAP C4C

    Posted 19 hours ago

    Thank you!

    This is what I needed ;-)



    ------------------------------
    Paul Simpson
    Views expressed are my own and do not necessarily reflect those of my employer.
    ------------------------------