Author Topic: How can I get the User Data from an interaction in a workbin?  (Read 2745 times)

Offline Gabi

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 0
How can I get the User Data from an interaction in a workbin?
« on: November 09, 2020, 02:58:51 PM »
Hello.

I have been asked to retrieve the User Data of an e-mail in a workbin when agents click on the Reply button to reply to that e-mail.

The e-mail has never been pulled from the workbin, so I cannot store its information in advance.

Checking the logs, I see that there is an EventInteractionProperties which contains the information I need, but I do not know how to capture that event. I have an interaction event handler in my InteractionManager, but it does not capture the EventInteractionProperties.

Could anyone please help me figure out how to make a handler for this event or otherwise retrieve this information from the workbin?

Thank you in advance.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: How can I get the User Data from an interaction in a workbin?
« Reply #1 on: November 09, 2020, 03:07:14 PM »
I would recommend you to use commands for that purpose. Within command you can get an object of interaction with all appropriate properties

Offline Gabi

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 0
Re: How can I get the User Data from an interaction in a workbin?
« Reply #2 on: November 09, 2020, 03:37:45 PM »
Thank you for your reply, but the only command to which I have access at that point is InteractionEmailReplyById, which gives me the Interaction Id but not the User Data, and so far I have been unable to find a way to retrieve the User Data associated to that ID since, again, the interaction itself has never been loaded.

If you would be so kind as to tell me how I can find it, I would appreciate it.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: How can I get the User Data from an interaction in a workbin?
« Reply #3 on: November 09, 2020, 03:48:36 PM »
You can use command IsPossibleToCreate within that chain to get the current interaction also with user data

Offline Gabi

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 0
Re: How can I get the User Data from an interaction in a workbin?
« Reply #4 on: November 09, 2020, 04:02:09 PM »
Thank you!