eCommerce integration as 3rd party email

Hi all,

I've read couple of similar topics but I found them to advanced for my barely sprouting PureCloud skills.

Short story :face_with_monocle:
We are trying to design a solution to integrate eCommerce website with a PureCloud based conversation processing. So far we came up with an idea to use some email server to produce real email (PureCloud provider) interactions so agents could receive and reply or just send email messages to the eCommerce website's users (via previously mentioned email server). The problem with that is that it requires unlimited email accounts on the email server. Now we are up to a different approach due to email account limitations and generally we have found it an 'ugly' solution. :poop:

What we would like to do now is to generate 3rd party provider emails via PureCloud API.
I found it is not possible to process this kind of interaction in a build in interaction window - which of course leads us to develop this possibility.

Now go the main questions:
Is it a common/recommended solution to process this kind of interaction (3rd party email) in a widget like this?
https://developer.mypurecloud.com/api/client-apps/

If yes, how to pass any data context to it? Does my external web app need to accept "{{pcConversationId}}" as the ONLY parameter and then use PureCloud API to load more info about current interaction? (I find this solution more like a "workaround" because I came from PureEngage and interaction context can be always present for any custom extensions.)

If no, what is the good way? Please let me know if I omitted anything that makes this topic not clear.
BR,
Dominik

Hello,

As you mention PureEngage, some clarifications regarding 3rd party email with Genesys Cloud.
It is not the equivalent of submitting/creating an email interaction from a web form (via GWS or PSDK).
Consider the Genesys Cloud 3rd party email as a workitem, which has a media type = email (for agent utilization & permissions perspective).

What I mean is that you can submit and distribute this 3rd party email to an agent (using an ACD Queue or an Architect Inbound Email flow with Transfer to ACD).
But when the agent receives that 3rd party email conversation (i.e. interaction), you will not be able to "reply" with a regular Genesys Cloud e-mail from the 3rd party email conversation window.
That's why I was saying that you should consider it as a workitem (if you see it from a PureEngage perspective).

Also note that because this is a 3rd party email (same with 3rd party chat), Genesys Cloud does not take care of the media itself.
The interaction will be visible in Analytics & Interaction History - but no transcript is saved for these 2 types of media.

"I found it is not possible to process this kind of interaction in a build in interaction window"
That's correct.
See some information here: https://developer.mypurecloud.com/api/rest/v2/conversations/third-party-object-routing.html
"When creating a chat or email to route, the Genesys Cloud UI won't display anything for the agent aside from the fact that the conversation is from an external system. Since there is no UI associated with these objects, the agent will have to interact with the media in the external applications."

As a note on 3rd party email:
POST /api/v2/conversations/emails
To submit a 3rd party email (Client Credentials Grant token is allowed here), provider would be set to a value different than the Genesys cloud one ("My Custom Email Provider"), direction set to "INBOUND".
Also note you can pass attributes (equivalent of User Data) through the "attributes" structure/object. They will be propagated to Genesys Cloud and stored in the conversation context.

"Is the interaction widget a common/recommended solution to process such?"
The interaction widget was introduced in Q4 last year (I think), specifically to allow a zone for customization inside conversations (I mean as a tab in each conversation window).
Before, only customization via custom client apps - the ones shown as Widget (Sidebar) or Standalone in this page - were possible.
The advantage of the interaction widget approach is that it is also conversation specific - the Genesys Desktop can replace {{pcConversationId}} in the configured url, with the value of the corresponding conversation [URL interpolation occurring when the page related to the interaction widget is loaded].
So, would that be a good approach to display what you need to display for these 3rd party email interactions? Yes - even just thinking about user experience (the info is accessed via a tab in the conversation, rather than something on the left like Widget Sidebar - which is not showing specifically to which conversation it is related to).

"If yes, how to pass any data context to it? Does my external web app need to accept "{{pcConversationId}}" as the ONLY parameter and then use PureCloud API to load more info about current interaction? (I find this solution more like a "workaround" because I came from PureEngage and interaction context can be always present for any custom extensions.)"
As a matter of fact, it is close to the PureEngage approach - with WWE (you can't compare it with WDE which is not a web based client) - passing the InteractionId and using getInteractionById from the Service Client API.
But it is true that you cannot use URL interpolation just to pass a single key/value pair from the participant attributes.

You would indeed retrieve the query parameter where you have set {{pcConversationId}} as value (in the Interaction Widget configuration).
You would need to authenticate/get authorized - using loginImplicitGrant method from the SDK (that's a difference with WWE - you have to authenticate to Genesys Cloud - but once authenticated/authorized you have access to the full Platform API - not a subset like with WWE Service Client API).
Then you can use the Platform API endpoints you want.
In your case, if you want to retrieve the context/details of the conversation (including the participant attributes - equivalent of the UserData with Engage), you could use a GET /api/v2/conversations/{conversationId} to get conversation context.
Or also GET /api/v2/conversations/emails/{conversationId}.
And then display the information you want in the interaction widget tab.

If you need to have your agent interact back with your system, you will have to do this also in the tab (with some API which allows you to have the agent interact directly with your service).
You could also create an email out via API (regular Genesys Cloud email). This will create a different/second conversation of type email (but this time a native Genesys Cloud email) that your agent can then access, can type text into, and then send/submit.
Such ACD emails generated by an agent must be sent on behalf of a Queue (direction = OUTBOUND for this request)
Ex:
POST /api/v2/conversations/emails
{
"queueId": "xxxxx-xxxx-xxxxx-xxxxx-xxxxxx",
"provider": "PureCloud Email",
"direction": "OUTBOUND",
"subject": "mytestsubject",
"toAddress": "test2@test2.com"
}

See here for a tutorial on creating 3rd party chat - close to the process of creating a 3rd party email: https://developer.mypurecloud.com/api/tutorials/chat-email-routing/?language=nodejs&step=1

You can also have a look at 2 blueprints to see how to create the code for an interaction widget. Code is available on Github - "Deployment Guide for Vonage Video on Genesys Cloud" and "Deployment Guide for Chat Assistant on Genesys Cloud"
The codes are not for a 3rd party email - but you'll see how the conversationId is retrieved from the URL, how the login (auth with Genesys Cloud) is done and how Platform API endpoints are invoked (like getting the conversation context by conversationId).

Regards,

Thank you Jerome, your answer went way beyond my expectations! Thank you, this streamlines my work a lot.

BR,
Dominik

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.