Get current queue by conversation ID?

I'm looking to create a trigger that will reset the Priority of a conversation when a callback enters a queue. Due to various reasons, we don't set Priority when creating callbacks via a custom website integration, so at present, these requests are lower priority than regular inbound calls hitting the same queue.

In order to equalize that, we need to get the current queue a conversation is in, and then do a data table lookup to find which Priority we want to set based on that queue, and then call a data action to the Conversation Patch API to update the priority of the callback.

I have the data action built and working, but I can't seem to figure out how to get "what queue is this conversation currently in?" in the context of the Workflow that the trigger will call. If this was an Inbound Call instead of a Callback, we could easily do this in an In-Queue Flow, but since Callbacks have no in-queue flow processing, we want to use a Trigger. Triggers don't pass this as a variable into the workflow, so I'm trying to figure out how I can query this with the API in an efficient way when all I have is the Conversation ID.

EDIT: May have figured out a path.

GET
/api/v2/conversations/callbacks/{conversationId}

This schema says it includes the Queue info, so I should be able to build a second data action to take the conversationId input variable of the Workflow, query this API to get the Queue info, then do the Data Table Lookup, and then finally do the Patch API on the conversation to update Priority. Will update this post after building and testing all that.

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