Interaction field variables not showing in email notification triggered by Virtual Agent

Keszia
Giga Guru

We have an email notification that is triggered when a particular event occurs (which is nested in and is working within a Virtual Agent topic), however if I try to populate the opened_by or opened_for variables to show the user's name and email address in the email notification, the results are blank.

 

Adding "current." doesn't affect results.

 

Keszia_0-1728950429226.png

Email Outbox:

Keszia_4-1728950802402.png

 

The user details field is populated for an interaction as soon as one is initiated, so I'm perplexed as to why the variable doesn't populate.

Keszia_2-1728950637400.png

If I preview the notification the details do populate:

Keszia_3-1728950787909.png

 

Grateful for any help on making these populate within the email notification. We are using Washington DC release. Everything else that we want it to do is working fine, apart from this.

10 REPLIES 10

It's the sys_id of the interaction record in context. You might be firing the event whenever an interaction record is created or updated, it's the sys_id of that record.


Please mark this response as correct and helpful if it assisted you with your question.

Ah, we are passing the interaction record via a mailscript so your GlideRecord recommendation may work for us, but I don't think I can use what you've given above because it will be a different sys_id every time the email is triggered.

@Keszia 

 

If you could please share how you are passing the interaction record in the email script and how you have configured the event, I could assist.


Please mark this response as correct and helpful if it assisted you with your question.

The script action in the Virtual Agent topic calls the email notification and a few other inputs:

(event_name has been defined prior)

gs.eventQueue(event_name,current,vaVars._topic_current,incident);
 
The mailscript then calls that information - designed so that all VA inputs are captured as we learned Email Notifications can only capture 2 parameters.
Keszia_0-1729451360365.png

 

I could see that you are passing current as a record reference while invoking the event with gs.eventQueue(event_name,current,vaVars._topic_current,incident); . Could you please confirm if current represents an interaction record being generated via VA.

 

If not, refer below post to get the sys_id of the interaction record being generated and try the method which I suggested earlier.

https://www.servicenow.com/community/virtual-agent-nlu-forum/virtual-agent-current-interaction-recor...

 

 


Please mark this response as correct and helpful if it assisted you with your question.