Genesys Cloud - Main

 View Only

Sign Up

Expand all | Collapse all

How to Get a Script Attribute in In Queue Email Flow

  • 1.  How to Get a Script Attribute in In Queue Email Flow

    Posted 10-13-2025 10:57

    I have set a script attribute along Set Participant Attribute data action to update the conversion. Now I can not seem to get the attribute in an In Queue Email flow with the Get Participant Data Action. Likely a configuration error in the architect flow, but I am unsure.  Any additional help is greatly appreciated! 

    Script Screenshot:

    Screenshot of Get Participant Data Action in In Queue Email Flow:


    #ArchitectandDesign

    ------------------------------
    Christy McDaniel
    Marketing Manager
    ------------------------------


  • 2.  RE: How to Get a Script Attribute in In Queue Email Flow

    Posted 10-13-2025 12:27

    Hi Christy,

    I am going to look into this, but hopefully in the meantime someone in the community will come up with the answer



    ------------------------------
    Sam Jillard
    Online Community Manager/Moderator
    Genesys - Employees
    ------------------------------



  • 3.  RE: How to Get a Script Attribute in In Queue Email Flow

    Posted 10-13-2025 12:35
    Edited by Elisson Fernandes 10-13-2025 12:39

    Hello Christy,

    From what I understand, your Data Action is probably configured with the following body, correct?

    {
      "requestType": "PATCH",
      "requestTemplate": "{\n  \"attributes\": {\n    \"${input.key}\": \"${input.value}\"\n  }\n}",
      "requestUrlTemplate": "/api/v2/conversations/emails/${input.conversationId}/participants/${input.participantId}/attributes",
      "headers": {}
    }

    When you enable browser debugging, you can check whether it was executed successfully. In your case, do you see any error during execution? (The name usually appears as "execute?flatten=true").

    Also, is the Blind Transfer working on your end? In my tests, I had to use the queue name, since using the queue ID resulted in an error.

    In the flow itself, I don't see any apparent issue, which is why I'm wondering if the API call is actually being executed to add the participant.

    Another point worth checking is whether the target queue is correctly linked to this In-Queue Flow.



    ------------------------------
    Elisson Fernandes
    ------------------------------



  • 4.  RE: How to Get a Script Attribute in In Queue Email Flow

    Posted 10-13-2025 13:17

    Elisson, thank you for the additional information. I have attached a screenshot of the data action I am using in the Script.  As for the Blind Transfer, it works as expected. No errors received.



    ------------------------------
    Christy McDaniel
    Marketing Manager
    ------------------------------



  • 5.  RE: How to Get a Script Attribute in In Queue Email Flow

    Posted 10-13-2025 12:55

    I may be wrong, but I think that Update Data is only for the Rules Based Decisions schema.  For Attributes, you only have Set and Get.  I would get the attribute then set the attribute using Append(Flow.Tag, NewAttributeValue) if you are trying to add to an attribute.  



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 6.  RE: How to Get a Script Attribute in In Queue Email Flow

    Posted 10-13-2025 13:30
    Edited by Christy McDaniel 10-13-2025 13:36

    Robert, sorry for not including this earlier.  The use case is this: Team A needs to transfer an email interaction to other members within the same queue for escalation purposes. Only certain queue members will be assigned an escalation skill. I was hoping to rely on the Script to tag or update the email conversion with an attribute and to be accessible within an In Queue Email flow so that I can identify the email interaction that have been escalated by using a Get Participant Data Action. Then once identified, I can apply skill assignment and routing logic.  Likely other ways to accomplish the same outcome, was just hoping to leverage existing Queues and not add any new Queues. The screenshot does show the desired Tag being applied to the conversion after using the Script button to apply the Tag and perform the blind transfer.



    ------------------------------
    Christy McDaniel
    Marketing Manager
    ------------------------------



  • 7.  RE: How to Get a Script Attribute in In Queue Email Flow
    Best Answer

    Posted 10-13-2025 14:14

    This will be tough.  Transferring from one agent to another through a queue transfer does not allow reskilling of the email when it enters the queue.  You will need to set the SKILL attribute BEFORE you transfer it to the queue.  You can do this with PATCH /api/v2/conversations/emails/{conversationId}/participants/{participantId}/attributes and setting this attribute  requestedRoutingSkillIds": [ "a2d816f6-7816-485b-8fec-21f8499dde2a" to the skill or skills you need: I believe that should be able to be done in a button in the script with a custom action calling a data action that updates that skill attribute and then could transfer to the queue.  Let me know if you have questions.  



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 8.  RE: How to Get a Script Attribute in In Queue Email Flow

    Posted 10-13-2025 16:17

    Thanks Robert, Intriguing suggestion! I have not used requestedRoutingSkillId, so I am not actually sure how to configure. 

    Update the Script and Data Action like the below screenshot and then somehow retrieve in the In Queue Flow? Sorry to burden with extra questions.



    ------------------------------
    Christy McDaniel
    Marketing Manager
    ------------------------------



  • 9.  RE: How to Get a Script Attribute in In Queue Email Flow

    Posted 10-13-2025 19:26

    Yes, you will need to create a data action for this and incorporate it into the script custom action like you have here.  Let me know if you need a sample data action to import.



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 10.  RE: How to Get a Script Attribute in In Queue Email Flow

    Posted 10-14-2025 09:10

    Robert, a sample data action would be great! Thank you



    ------------------------------
    Christy McDaniel
    Marketing Manager
    ------------------------------



  • 11.  RE: How to Get a Script Attribute in In Queue Email Flow

    Posted 20 days ago
    Edited by Peter DeMarco 20 days ago

    Robert,

    I've tried a few tests with your recommended PATCH to update the attribute requestedRoutingSkillIds, and while I can confirm that the attribute is added to the specified participant, the Skill field itself is not updated, and the Attribute has no effect on the routing.  Is there something I'm missing in this scenario?

    I've been researching consolidating several of our Queues into a single Queue, using Skills for routing.  While there are methods to handle transfers of live callers (a DID pointing to a Flow that updates the Skills as required) there is not currently a similar path for Emails (the transfer to Flow is a potential future update, but not available at this time.  There is no email equivalent to an internal DID)

    One solution would be to leave the old queues intact, and use an In-Queue flow to assign the Skill, and then transfer it back to the main Queue, but that feels like a clumsy solution, and I am trying to avoid using a collection of otherwise-do-nothing queues.  The whole point of this exercise is to reduce the number of queues in the system.

    (edit: after posting this, I checked our Org settings and Strip Skills on Blind Transfer is enabled - - I will need to test again after normal business hours.)

    Any further insight or suggestions would be appreciated.



    ------------------------------
    Peter DeMarco
    na
    ------------------------------



  • 12.  RE: How to Get a Script Attribute in In Queue Email Flow

    Posted 20 days ago

    Do you have Strip Skills on Transfer enabled?  For what you are doing, it needs to be disabled, but you need to ensure agents in other queues have skills from the original call or that all skills are going through a flow to change them. 



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 13.  RE: How to Get a Script Attribute in In Queue Email Flow

    Posted 20 days ago

    Robert,

    Okay - I disabled Strip Skills on Transfer - and made a test email.  It didn't behave as expected.

    1. Sent email into queue, with Skill assigned.
    2. used GET  /api/v2/conversations/emails/{conversationId} to retrieve/verify participant data
      1. Connected was Customer & ACD
      2. Skills is only showing entry on Customer (original skill ID)
    3. Answered email from queue, with Agent A (has skill)
    4. used GET  /api/v2/conversations/emails/{conversationId} to retrieve/verify participant data
      1. Connected was Customer & Agent A
      2. Skills is only showing entry on Customer (original skill ID)
    5. used PATCH /api/v2/conversations/emails/{conversationId}/participants/{participantId}/attributes to add Attribute requestedRoutingSkillIds to connected participant (applied to both Customer & Agent)
    6. used GET  /api/v2/conversations/emails/{conversationId} to retrieve/verify participant data
      1. Connected was Customer & Agent A
      2. Skills is only showing entry on Customer (original skill ID)
      3. the Attribute requestedRoutingSkillIds is showing on Customer & Agent with the new skill ID
    7. Transferred email back into same queue
    8. used GET  /api/v2/conversations/emails/{conversationId} to retrieve/verify participant data
      1. Connected was Customer & ACD (new ACD participant)
      2. Skills is only showing entry on Customer (original skill ID)
      3. the Attribute requestedRoutingSkillIds is showing on Customer, not the ACD
    9. Answered email from queue with Agent B (no skills assigned)
    10. used GET  /api/v2/conversations/emails/{conversationId} to retrieve/verify participant data
      1. Connected was Customer &  Agent B
      2. Skills is only showing entry on Customer (original skill ID)
      3. the Attribute requestedRoutingSkillIds is showing on only Customer with the new skill ID (not showing on Agent B)

    Things I note:

    1. the Attribute requestedRoutingSkillIds never translates into an actual Skills entry
    2. The transfer was delivered to a skill-less agent - even though Strip Skills on Transfer was disabled at the ORG level.


    ------------------------------
    Peter DeMarco
    na
    ------------------------------



  • 14.  RE: How to Get a Script Attribute in In Queue Email Flow

    Posted 10-13-2025 14:39

    Christy,

    Do you have "Flow Execution History" enabled in your organization? If so, it allows you to verify whether the queue flow you created was actually executed.

    Regarding the skill, you can use the "Set Skills" action in the flow to assign it, just keep in mind that the queue must be configured to use skills, otherwise the assignment won't take effect.



    ------------------------------
    Elisson Fernandes
    ------------------------------



  • 15.  RE: How to Get a Script Attribute in In Queue Email Flow

    Posted 10-13-2025 15:17

    Elisson, How are you transferring to an Email flow?



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 16.  RE: How to Get a Script Attribute in In Queue Email Flow

    Posted 10-13-2025 16:19

    Hello Robert,

    In this case, I created an In-Queue Flow similar to his and then linked it to the queue configuration. The flow looks as follows:

    In the Script, I also followed the same approach, I created a button that, when clicked, triggers the action to add the attribute and then transfers the interaction to the queue.



    ------------------------------
    Elisson Fernandes
    ------------------------------



  • 17.  RE: How to Get a Script Attribute in In Queue Email Flow

    Posted 10-13-2025 16:31

    That is an In-queue email flow.  If there are agents available, it will route before hitting this flow.  



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 18.  RE: How to Get a Script Attribute in In Queue Email Flow

    Posted 10-13-2025 17:39

    Robert,

    I understand your point, and indeed I hadn't realized that the issue isn't with the "Get Participant" itself, but rather that the flow doesn't have enough time to execute when an agent is available.

    Christy,
    in this case, one possible approach would be to use a queue flow as a kind of transfer matrix.
    You don't need to create multiple queues, a single dedicated queue for this function would be enough.

    Example:
    In the inbound email flow, you can add the queue name as a participant attribute (or retrieve it within the matrix flow).
    The interaction enters the queue and the agent handles it normally. If escalation is needed, instead of performing a Blind Transfer directly to the same queue, the button you created would first route the interaction to this transfer matrix queue.

    Inside this queue, the flow would retrieve the queue and skill attributes, and based on that data, it would automatically transfer the interaction to the appropriate queue with the selected skill.



    ------------------------------
    Elisson Fernandes
    ------------------------------



  • 19.  RE: How to Get a Script Attribute in In Queue Email Flow

    Posted 10-13-2025 19:27

    So, essentially, transfer to a queue that changes the skill with the in-queue flow and then transfers back to the original queue with the new skill.  Might work as long as strip skills on transfer is not turned on.



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 20.  RE: How to Get a Script Attribute in In Queue Email Flow

    Posted 17 days ago

    Additionally, you can set an attribute in a script by using a variables and configure it as Output variable. When the value of the variable changes, the attribute (name will be the name of the variable) will be written/updated within 3s.
    And if the attribute exists on the customer participant before the script is loaded (set by a flow), this will also be updated.



    ------------------------------
    Christian Karpp
    Principal PS Consultant
    ------------------------------