Policy Automation for B2C Service

Get Involved. Join the Conversation.


    Eric S
    Pass Login ID to OPA interview from External Application
    Topic posted January 17, 2019 by Eric SSilver Medal: 2,000+ Points 
    113 Views, 1 Comment
    Pass Login ID to OPA interview from External Application
    Add Login ID to embedded interview in internal application

    We are looking at creating an interview that we can embed on our website that is not hosted on the Oracle Service Cloud. 

    In reading through the documentation on embeding an interview in another application using a div, I am seeing an option to include Seed Data. 

    Looking at the example script, can I add a query that would pull the Login ID from my system and add it as a seeddata element in this script that I could pass to the OPA interview to identify the Contact. Would that then allow me to connect the interview to the Contact in the Oracle Service Cloud so that I can create an Incident tied to that Contact? 

    I'm still pretty new to OPA, and am wanting to figure out this solution as our web team would rather embed the interview rather than taking the user to the OSvC Customer Portal.

    Code Snippet:



    • Niamh NicClamha

      Hi Eric,

      The following should work:

          var el = document.getElementById("interviewDiv");
          var webDeterminationsUrl = "https://xxxx.custhelp.com/web-determinations";
          var deploymentName = "LoanAdvisor";
          var locale = "en-GB";
          var seedData = {"my_id" : "12345"};
          OraclePolicyAutomationEmbedded.StartInterview(el, webDeterminationsUrl, deploymentName, locale, null, null, seedData );


      Where my_id is the attribute name and "12345" is replaced with the value you wish to set it to. I believe the two null parameters are required as placeholders for opaUser and params as per OraclePolicyAutomationInterview.StartInterview(el, webDeterminationsUrl, deploymentName, locale, opaUser, params, seedData, onLoad, onNavigate) but I haven't tried without them.