For partners that build or integrate commercially available applications and service solutions with the Oracle Cloud Platform
For partners that provide implementation or managed services around Oracle Cloud Applications
I'm accessing an OPA interview inside the Service Cloud (Not via the browser control/CP page). In one of the scenarios, I'm required to load the Javascript API. But it doesn't seem to be working and I'm getting the following error whenever the following line is executed
var inc = window.external.Incident;
The error being thrown is
TypeError: Unable to get property "Incident" of undefined or null reference
Does this mean I can't use Javascript API inside OPA interviews?
EDIT: My bad! It's not via the browser control, but within the Service Cloud CX itself.
Comment
Just to clarify, do you mean you have embedded the interview on a Customer Portal page via the OPA Widget, or the interview is running within the ServiceCloud CX? In the Customer Portal the Interview is rendered inside an iframe, and because of this the iframe javascript does not have permission to reach outside of the iframe to the parent window. You may however use javascript on the parent page which sets a controls value inside the Interview with something like:
Be the first to rate this
|
Sign in to rate this
A couple of questions.
1. It sounds like you are using the Browser Control instead of the built in OPA control for Agent Desktop. Can I ask why?
2. Since you are using the Browser Control you can provide the incident ID via the supported command-line parameters. In combination with the Delay Load option this should allow you to do what you need.
Be the first to rate this
|
Sign in to rate this
Hi Scott and Davin,
The interview is running within the ServiceCloud CX and not a CP page. At the end of the interview, we are using the "Submit and Redirect" option and inside the redirected page, Javascript API code is set to run.
I'm assuming that the moment the interview ends and the page redirection takes place, it opens the page within the browser control. And this is where I intend to use the Javascript API
Be the first to rate this
|
Sign in to rate this
What is the URL of the redirected page?
We might need to get someone more experienced with the Agent Desktop to help us understand why you can't successfully use the Javascript API - that isn't an OPA feature.
Be the first to rate this
|
Sign in to rate this
Hi Davin,
The URL points to a CP page.
EDIT: I can't seem to copy-paste the direct HTML of the page, so attaching the same
Be the first to rate this
|
Sign in to rate this
What do you want to do exactly with the Javascript API. Set the incident ID to something? Are you in the incident workspace?
The best way to create incidents with OPA inside Agent Desktop is to use the Policy Automation control instead of the Browser Control, and use the mapping in Oracle Policy Modeling to create the incident. This will make sure the incident ID of the incident workspace is set when the interview completes.
Be the first to rate this
|
Sign in to rate this
I probably should have started with the use case scenario. Sorry about that. So here goes:
Is this approach right?
Be the first to rate this
|
Sign in to rate this
There is a much easier way, which is simply to drop an OPA control onto your Incident workspace, and use the Mapping Settings on the Data tab in Oracle Policy Modeling to choose options along these lines:
In Who is this interview for? choose Contact centre staff (Account)
In At start of interview choose Load a particular: Incident
In At end of interview choose Update Incident
This approach requires you to have Single-Sign On enabled between your RightNow and OPA sites (which is done by default if they were provisioned together), and to be licensed for the OPA Agent Cloud Service.
Average Rating:



2 ratings
|
Sign in to rate this