Hi,
Can I configurate script for send emails?
Thanks
Sergio
Hi,
Can I configurate script for send emails?
Thanks
Sergio
There's no native email action at the moment that would let you send PureCloud emails. You can leverage any email provider to send emails from within scripts, as their APIs allow.
Hi Lucie, thanks for you answer.
So I can create a custom action using /api/v2/conversations/emails/{conversationId}/inboundmessages and then put it into my script?
Are you trying to start a new outbound email on behalf of a queue using PureCloud? You'd want the POST /email api for that: https://developer.mypurecloud.com/api/rest/v2/conversations/index.html#postConversationsEmails. If using data actions, you'll run into some authentication challenges there that are solvable, but may require some additional work.
If you want a totally separate email that will not be accounted for in PureCloud, you can use Amazon SES or any email provider.
The API you posted is for third party email conversations. Here's how those work: https://developer.mypurecloud.com/api/rest/v2/conversations/third-party-object-routing.html
I' trying to use a outbound mail with PureCloud (https://developer.mypurecloud.com/api/rest/v2/conversations/index.html#postConversationsEmails).
Effectively I have this problem:
"message": "REST call for action execute failed. Message:Request to backend service failed. Response from web service: {"status":403,"code":"missing.permissions","message":"Unable to perform the requested action. You are missing the following permission(s): [conversation:email:create]"} [9c7d71dc-aaf2-46a8-8a05-9609933bb4f6]"
In PureCloud my user have this permission
Thanks
Sergio
You seem to be running into the authentication challenges I mentioned above. Here are more details on how you can make this work.
The 403 error above is because the client credentials being used are missing the stated permission, conversation:email:create. However, this API can only be called within user context so even if you grant the permission, this will still not work. We specifically disallow this as we require that a person creates this email to avoid abuse.
In case you try to make other API calls that require a user context (e.g. answer email, assign wrap up code), a solution other than data actions must be used. Data actions can only be used with client credentials, which do not have a user context. To use APIs that require a user context, you could write a custom web page application that authorizes the user using an OAuth flow, then that page can make any API requests the user has permissions for. The custom web page can be embedded into a custom script to make it available to the agent while handling the conversation.
@SergioRota btw I edited my response above so in case you were already following my earlier instructions, please re-read the updated ones.
I read again your previous post, so I can't use this API in my custom action.
For the other way
Have I however to create web page or is there a solution in PureCloud?
Thanks for your quick answers
Sergio
You'd have to create a web page and then show the web page via a script. There's no native solution currently. You can always add it to the ideas portal here: https://purecloud.ideas.aha.io/ideas
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.