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

Amit Verma
Kilo Patron
Kilo Patron

Hi @Keszia 

 

Tried reproducing the issue on my PDI but it is working as expected. Refer below snips -

AmitVerma_0-1728971965726.png

 

AmitVerma_1-1728971980022.png

 

AmitVerma_2-1728972069579.png

 

If possible, can you please share how you have configured this notification ?

 

Thanks and Regards

Amit Verma


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

Hey Amit, thanks for giving this a go to try help me.

 

Here's what I do to create these email notifications:

  1. Create the event (System > Event Registry)
    • This is then added into a script action within the Virtual Agent topic that is intended to trigger the email notification.
  2. Create the notification (Email > Notifications)
    • Name: (as appropriate for the cause)
    • Table: Interaction
    • Category: Virtual Agent
    • Application: Global
    • Active: (tick)
    • When to send:
      • Send when: Event is fired
      • Event name: (Created in step 1 above)
    • Who will receive: (as needed)
    • What it will contain: (as needed - this is where I'm trying to have the interaction opened by name/email populate)

When I preview the notification in the Email > Notifications area the details populate, but not in the Email > Outbox when the event triggers the notification.

Hi @Keszia 

 

I was able to identify the root cause of your issue. Actually, while triggering the event, you might not be passing the interaction record GlideRecord to 

gs.eventQueue();

 

Refer below snips where I first fired the event without passing the interaction GlideRecord() and did not got the Opened by Name and Email whereas when I pass the interaction GlideRecord(), I am able to get them.

 

AmitVerma_0-1729055589625.png

 

AmitVerma_1-1729055612456.png

 

AmitVerma_2-1729055732087.png

 

AmitVerma_3-1729055780675.png

 

Thanks and Regards

Amit Verma


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

Thanks Amit, I'll give this a go - in line 2 of your script, what sys_id are you using?