Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  Create an "Email" Flow

    Posted 06-05-2025 18:11

    Twin_Engines | 2016-10-27 16:07:31 UTC | #1

    Good Morning,

    I am trying to figure out if it is possible to create a "Call Flow" for emails, similar to what we have in the architect, the thing is we need a work around while Pure Cloud releases this option to be used.

    I think there is nothing that can trigger an alert or notification when an emails comes in right? i need to get the email then call my actions in my web service (doing the same flow that is configured in the architect) and then INSERT the email into a queue.

    If there is nothing to trigger this action i could be checking the email inbox, do my logic to trigger my web service, but i haven't been able to find anything on the API that could insert an email to a queue, i know we can attach an email to a user queue from the admin site, now what i need is based on some logic once i figure out who's queue it needs to be in then insert it there so a User can pick it up from his queue.

    I am being clear about what i want to accomplish?, any help on what direction could i take would be very helpful.


    anon47189846 | 2016-10-27 16:32:08 UTC | #2

    We are working actively at this time on "Email Flows" within Architect will will expose new capabilities to allow data integrations, decisions based upon sender, recipient, keyword spotting of subject and body. Eventually we want to extend to auto replies and some other pretty cool stuff.


    Twin_Engines | 2016-10-27 16:34:45 UTC | #3

    Hello Nicholas, thanks for the reply, i do know you guys are working on it and actually once it is released we sure will use it, but i am trying a work around at least for now, is it possible?


    tim.smith | 2016-10-27 16:41:57 UTC | #4

    There's not currently anything that will allow you to perform operations in between the checking of the inbox and putting it in queue. However, there are some new APIs that are targeted for public release next month that will allow you to create email and chat objects for routing. The intent is for those APIs to be used in conjunction with an external system to route tickets or whatever info you have, but this would also allow you to write an application that checks the inbox yourself and then create "emails" in PureCloud as necessary.

    Alternatively, if you can handle the reporting implications, you can:

    • use the OOTB email queuing for a queue with no agents
    • subscribe to queue notifications via the API to get queue events for those emails
    • do what you need to do when new emails come in
    • transfer the emails to a new queue for routing

    Twin_Engines | 2016-10-27 16:59:53 UTC | #5

    Thanks Tim, right now it is possible to transfer an email to another queue with the current API?, so if I set up may be a generic queue i could pick a notification and transfer it right away to whatever queue i want?, that is not exactly what i need but could be useful


    tim.smith | 2016-10-27 17:02:41 UTC | #6

    You should be able to transfer an email with POST /api/v2/conversations/emails/{emailId}/participants/{participantId}/replace


    Twin_Engines | 2016-10-31 16:34:37 UTC | #7

    Thanks Tim, just to make sure i understand this function.

    It requires a participant id which should be the person sending the email?, it also asks for an email id and the body where i assign the queue ID i want it to go to.

    But the emailid when i try to assign it the result says it didn't find it, then i tried using the conversation id and says the access is forbidden, could you please tell me what would i need and if i am using the correct parameters please.


    tim.smith | 2016-10-31 17:16:33 UTC | #8

    Twin_Engines, post:7, topic:548
    It requires a participant id which should be the person sending the email?

    This resource replaces one participant with another, so you should replace the queue participant with another queue or agent.

    Twin_Engines, post:7, topic:548
    But the emailid when i try to assign it the result says it didn't find it, then i tried using the conversation id and says the access is forbidden, could you please tell me what would i need and if i am using the correct parameters please.

    You should be using the conversation ID for the emailId parameter. Make sure you have the transfer permission:

    <img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/3e25780f2196c8f1baa78cff5bfbbb589ffd9b91.png" width="654" height="52">


    Twin_Engines | 2016-10-31 17:45:50 UTC | #9

    Thanks again for the quick response, i just added the permission to the role and it worked, i just noticed that it added a new participant to the conversation as an ACD on the purpose with the queue i wanted but i am confused if it actually did what i wanted.

    I have a generic queue, so the first email comes there, then i pick up a notification and i do the transfer method, my intention is the email goes to another queue so someone associated to that queue can pick it up, i don't know if i accomplish that by adding a new participant to the conversation. I noticed that the Queue name under the Caller name changed to the one i wanted but still not sure if that worked as i meant.

    I need i am just about to finish it so just need to clear out that and i guess i am good to go with it.


    tim.smith | 2016-10-31 17:53:21 UTC | #10

    Twin_Engines, post:9, topic:548
    it added a new participant to the conversation as an ACD on the purpose with the queue i wanted

    That sounds correct. The new queue is the new participant. Once it ACD assigns the email, the queue will be replaced with an agent participant. You can verify it's in the correct queue via the Queue Detail View.


    Twin_Engines | 2016-11-03 15:15:12 UTC | #11

    Hello, doing some testing on this function i noticed that the email remains in the generic queue so kind of feels like it is creating a copy instead of transferring the call, should i delete something then?, does this works as a "blind transfer" for the email? thanks in advance.


    tim.smith | 2016-11-03 15:27:27 UTC | #12

    Do you have a context ID for a request to transfer an email to another queue?


    Twin_Engines | 2016-11-03 15:31:19 UTC | #13

    Sorry, not sure how to get that context ID you just mentioned.


    tim.smith | 2016-11-03 15:47:09 UTC | #14

    context ID == inin-correlation-id header


    Twin_Engines | 2016-11-03 17:27:37 UTC | #15

    I am using the c# API, looks like the method "PostEmailsEmailIdParticipantsParticipantIdReplace" is void, i only get the context ID of my request if it fails.


    tim.smith | 2016-11-03 17:41:50 UTC | #16

    Use PostEmailsEmailIdParticipantsParticipantIdReplaceWithHttpInfo and get the headers from response.Headers.


    Twin_Engines | 2016-11-03 17:49:53 UTC | #17

    Thanks, this is the id i just got from a test email: d460942f-7880-4f47-98c8-2cc6f922a40a


    tim.smith | 2016-11-03 19:33:24 UTC | #18

    Thanks for that. I can see that there's an error in the assignment service that doesn't appear to be bubbling up to the public API. That would explain why your request was successful but the email wasn't transferred. Could you open a ticket with PureCloud Support for this and provide that context ID? This error appears to be deeper than the API itself and support can dig in to troubleshoot it.


    Twin_Engines | 2016-11-03 21:28:26 UTC | #19

    We will create a ticket, thanks for all the help


    Twin_Engines | 2016-11-17 16:05:47 UTC | #20

    Hello,

    I am now continuing with trying to do a ‘blind transfer’ to move the email from one queue to another.

    And i got this as an answer to the ticket #00039497:

    The API is such that you use the ID of the participant you want to replace: POST /api/v2/conversations/emails/{emailId}/participants/{participantId}/replace not the ID of the participant that is being transferred.

    I am not sure if i understand how to use this function, for example, if a customer sends and email to the generic, i don't need anyone to answer it as the idea is to move that email to any queue i want so the parameters to this function should be the conversation id, the queue id i want in the body request and the participant id.. not sure whom this id belongs to?, the agent, the acd? i don't need to transfer to an specific user but to a specific queue.

    Sorry for all the trouble but if you could explain a little bit on detail how this works would be perfect, thanks.


    anon46016647 | 2016-11-22 17:56:01 UTC | #21

    Hey Twin_Engines,

    "i want in the body request and the participant id.. not sure whom this id belongs to?, the agent, the acd?"

    You want to replace the acd participant (the queue) with the new queue.


    system | 2017-08-28 19:28:14 UTC | #22


    This post was migrated from the old Developer Forum.

    ref: 548