Forum Stats

  • 3,780,652 Users
  • 2,254,421 Discussions
  • 7,879,408 Comments

Discussions

Trying to connect OPA and engagement cloud using DIV

3296625
3296625 Member Posts: 1

Hi Team,

I am getting below error message when trying to embed OPA interview in CEC using DIV . Below is the function and syntax i use for calling OEC using JWT token .  Please confirm is the sytax correct for calling OPA using JWT token .

Error Message :

An error occurred trying to process your request.

For further assistance please contact support.

Syntax for calling OPA :

var el = document.getElementById("interviewDiv");

var webDeterminationsUrl = "https://XXX.custhelp.com/web-determinations";

var deploymentName = "Application PoC";

var params = {"SurveyCaseId": OptyId, "jwt": data.result};

var seedData= {"contactID" : contactID};

OraclePolicyAutomationEmbedded.StartInterview (el, webDeterminationsUrl, deploymentName, undefined , undefined , params, seedData );

PFB image of HUB configuration .

Also i like to know where  can i see the issue log . currently no issue  information is present in OPA hub message log  .

hub.png

Tagged:

Answers

  • Scott Berry
    Scott Berry Posts: 29 Employee
    edited Jan 30, 2018 8:35PM

    Your calling script looks perfectly fine.

    Running this locally, I get this Load request leaving web determinations to the connector:

    [Header]

    Authorization: Bearer [data.result]

    SOAPAction: "Load"

    ...

    [Content]

    [envelope/body...]

            <m:load-request root="[Input table]" region="[default]" language="[default]" timezone="Etc/GMT">

                <m:request-context>

                    <m:parameter name="SurveyCaseId": " value="[OptyId]"/>

                </m:request-context>

                <m:tables>

                ...

    The most common problem which throws up that error is providing a key-value pair in seedData for a global attribute which isn't there, so check your global attributes and make sure you have one called 'contactID' (it's case sensitive!). I would expect however that the hub log would report that this is what has happened though, but you report that hasn't happened, so...

    Other things to try:

    1. Print your 'OptyId', 'data.result' and 'contactID' values to see if they've been initialized before the OraclePolicyAutomationEmbedded.StartInterview() call. Also, they need to be simple value types, not objects!

    2. Open your browser's Developer Tools and see what the Console is logging, maybe you have a simple JS problem preventing the browser from reaching web-determinations

    3. Under developer tools, look at network activity. There should be a JSONStartOrResumeSession call: check the body of the request looks like what you'd expect based on the script above, i.e.

            [{"operation":"start","deploymentName":"Application PoC","params":{"SurveyCaseId":"[some survey ID]","jwt":"[some token value]"},"el":{},"seedData":{"contactID":"[some contact ID]"}}]

This discussion has been closed.