Daniel_Grosso | 2017-06-29 10:50:19 UTC | #1
Greetings,
We are implementing a pure cloud solution for an organization that will use his own custom front-end.
Is it possible to embed purecloud scripts in an iFrame to show them to the agent during an outbound campaign?
If so, how would the SSO work on this scenario? We are planning to use SAML integration for the REST API calls.
Thanks in advance.
Regards, Daniel Grosso Lisbon, Portugal
tim.smith | 2017-06-29 13:18:13 UTC | #2
The Scripting feature can't be used as a stand-alone feature separate from the rest of the UI. Additionally, not all of the APIs required to implement scripting are exposed, so you wouldn't be able to implement the scripts in your own customer UI either. I've logged an enhancement request for your use case, however.
You should be able to embed the complete PureCloud UI in an iframe, but I'm guessing that's not going to be suitable for you based on the integration you're describing.
Although you can't embed scripting like you had hoped, I'll still answer the SSO question for future benefit. What it comes down to is that both applications have to be authorized by the user because they will reside on different domains. There is no inherent trust between domains, so it's impossible for an authenticated session from one domain (yourdomain.com) to create an authenticated session for another domain (mypurecloud.com). What you can do, however, is use a SAML provider to manage authentication. If you do this, the user will authenticate with the 3rd party identity provider and then that IDP will provide SAML assertions when the user wants to log in so they don't have to enter their credentials each time, even for sessions initiated by different domains.
Daniel_Grosso | 2017-06-29 17:12:01 UTC | #3
Thank u for answering Tim.
Regards, Daniel
Daniel_Grosso | 2017-07-03 08:58:27 UTC | #4
Hello again Tim.
One more question, if u please.
You said that "not all of the APIs required to implement scripting are exposed". However, I seem to be able to get enough information (inputs, texts, ...) about a given script to draw it in the custom UI.
One thing I haven't find out is how do I submit the answers to the script questions on a given contact list.Is it possible via REST API?
Am I missing something here?
Thanks in advance.
Regards, Daniel
tim.smith | 2017-07-05 14:02:46 UTC | #5
Daniel_Grosso, post:4, topic:1482
One thing I haven't find out is how do I submit the answers to the script questions on a given contact list.Is it possible via REST API?
not all of the APIs required to implement scripting are exposed
:)
Daniel_Grosso | 2017-07-05 15:04:39 UTC | #6
Hello Tim.
Once again, thank u for answering.
After investigating a bit further I may have found out a way to reproduce part of the outbound scripts functionality. Keep in mind that we don't want to reproduce the script builder tool, we only need to present a previously created script, at calltime, when an agent is performing an outbound campaign.
Given this, the strategy would be:
- a supervisor would configure a script using only output and input fields in PureCloud's Front end
- It would then configure the campaign and correspondent contact list
- During the actual campaign, at calltime, our custom front end would fetch the script from the active conversation and drawit as an HTML form to the agent
- when submitting the data, our custom front end would use "PUT /api/v2/outbound/contactlists/{contactListId}/contacts/{contactId}" to update the correspondent contact columns with the answers
For this strategy to work I would need the {contactId} from the active outbound call and this I can't find a way to fetch.
Regards, Daniel
tim.smith | 2017-07-05 15:18:08 UTC | #7
Daniel_Grosso, post:6, topic:1482
I would need the {contactId} from the active outbound call
If you're using an analytics detail query, look for the outboundContactId property on the customer participant's session. If you're using a conversation API, look for the dialerContactId property on the customer participant's attributes.
Daniel_Grosso | 2017-07-05 15:22:33 UTC | #8
Thank u Tim.
That was very helpful.
Do u see any flaw on this strategy?
Best regards, Daniel
tim.smith | 2017-07-05 15:30:56 UTC | #9
Your approach is limited to dialer calls since you're relying on the outbound call list, but scripting is available for inbound as well. But as long as this implementation meets your use case, it sounds like it should work.
Daniel_Grosso | 2017-07-05 15:50:34 UTC | #10
Ok Tim. I've understood the limitations.
Could u help me find this dialerContactId attribute, please? I'm looking in the conversations swagger but I can't find it.
Thank u.
Regards, Daniel
tim.smith | 2017-07-05 15:59:51 UTC | #11
Here's a snippet from GET /api/v2/conversations/calls/{conversationId}:
{
"id": "7567acd1-eed5-4338-ba0d-bd49bb729e28",
"participants": [
{
"id": "0c502545-8c22-40d0-99ba-a56f50d9bfb1",
"name": "Indianapolis IN",
"address": "tel:+13172222222",
"startTime": "2017-07-05T14:17:25.904Z",
"connectedTime": "2017-07-05T14:17:29.908Z",
"endTime": "2017-07-05T14:17:33.256Z",
"purpose": "customer",
"state": "disconnected",
"direction": "outbound",
"disconnectType": "peer",
"held": false,
"wrapupRequired": false,
"queue": {
"id": "636f60d4-04d9-4715-9350-7125b9b553db",
"selfUri": "/api/v2/routing/queues/636f60d4-04d9-4715-9350-7125b9b553db"
},
"attributes": {
"scriptId": "476c2b71-7429-11e4-9a5b-3f91746bffa3",
"dialerContactId": "9683af60d1b2bcbdaf6a1fd1a40f19f2",
"dialerContactListId": "f19465cf-5bc6-4871-b59f-5307575ddddf",
"dialerCampaignId": "7fc6b00a-f2f5-44d2-9fc5-169f339f6c4b",
"dialerInteractionId": "80ab9126-8a95-4ce4-aa88-63851cb6e7c1"
},
// truncated
Daniel_Grosso | 2017-07-05 16:14:19 UTC | #12
I see...
Unfortunately, something's not matching here...
To update a contact list contact, as far as I understood, I need to call
PUT /api/v2/outbound/contactlists/{contactListId}/contacts/{contactId}
where {contactId} is an internal number assigned by the PureCloud whenever I upload a contact list.
the formats don't seem to match, as I've created a contact list and PureCloud assigned sequential numbers to my contacts like...
inin-outbound-id 001 002 003 ...
I'm guessing it's not the same, right?
Thank u Tim.
Regards, Daniel
tim.smith | 2017-07-05 16:16:39 UTC | #13
The contact ID depends on how your list is configured. See step 7 here: https://help.mypurecloud.com/articles/append-records-contact-list/
In my example, I didn't provide a unique ID so PureCloud is generating it for me.
Daniel_Grosso | 2017-07-05 16:30:27 UTC | #14
Great.
So u confirm the ID's will match, right?
Thank u very much for ur time!
It was very helpful.
Regards, Daniel
system | 2017-08-05 16:30:36 UTC | #15
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 1482