How to get UserName in Architect workflow from a Trigger?

Hi all,

I posted this in the Triggers room and it was suggested, I bring it over to the Architect forum for assistance.

Hoping someone here can help. Here is our goal, we want to create a trigger that calls a workflow to send out an email notification when someone places an Outbound call to an Emergency route (i.e. 911 or 933).

We'd like to be able to include items such as the user who is making the Emergency call. Can we get the user name (ultimately we need the friendly name of the user and not the GUID) by using TopLevelPrimitives? If so, any idea on how to properly retrieve that in Architect? We know how to get the ConversationId and other TopLevelPrimitives in Architect from a workflow/trigger, from there, unsure of how we'd get the userId.

If not, would we need to use Json as the data output and then jsonData in Architect? If so, I can't find an example of how to extract attributes from this jsonData object in Architect. Specifically, how would we get say the userId/username and conversationId?

Fingers crossed that someone has done something similar to this. Using top level primitives, I believe we can get everything we need, except I'm unsure about the user who is placing the outbound call.

I'll keep working this and if I discover a solution, I'll post an update here.

Thanks as always,
Shane

Hi Shane

You didn't mention the topic you are using but if you use v2.detail.events.conversation.{id}.user.start then you get the userId with TopLevelPrimitives format like conversationId and in the Workflow you just need to use Find User by ID node to retrieve the User so you can add User Name in the notification.

I can help with jsonData extract example too and you can also use data action to retrieve user from the conversation APIs but above is the simplest approach.

Let me know if above solution does not work.

Cheers
Zubair

2 Likes

Again Thanks Zubair! Excellent info and we were able to get this functioning. I owe you yet again.

Thanks again,
Shane

1 Like

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