The CreatorCon Call for Content is officially open! Get started here.

How to handle email watermark on reply emails

Cirrus
Kilo Sage

Help please,

This is causing us some grief and whilst we believe it should be an easy fix, we are not sure how to incorporate it into the script. Basically, we have a reply inbound email action (full script attached) that creates a new interaction when a reply email is received. There is no issue with this script, it is working as expected.

The problem is this: a new email is received and creates an interaction. Servicedesk then reply to the customer and close the interaction. Often though, the customer then replies back with a 'Thankyou' - this reply is creating a new interaction with the same number (because of the reply inbound action and the email watermark), but it doesnt link to the original email, so agents are struggling to search for the original correspondence to determine if any action is required.

If we disable the reply inbound action, it updates the original interaction, but because the interaction is closed, the agent then has no visibility in workspace view that an update has been received. Also, disabling the reply action means that other sources of reply emails that do require a new interaction will not be handled.

 

We believe (or hope) that this is a simple fix, in that we just need to amend the attached script along the lines of if email has watermark, update existing and set State back to in progress and active = true, else follow attached script to create new interaction, but can anyone advise on how to achieve this please. Is it just a few lines of extra code on the script or do we need to look at a different solution for replies to closed interactions.

 

Thanks in advance

3 REPLIES 3

Tony Chatfield1
Kilo Patron

Hi, if you disable your reply inbound action how is it that your existing task is being updated?

Do you have multiple reply inbound actions triggering for the same conditions?

Looking at the code you supplied, the code includes

current.insert();

and this would result in a new record being created.

if you replace this with

current.update();

this should result in your existing record being updated, but only if your instance has mapped the existing record as the 'target' via a watermark match or task number match in email subject ie RE: INC000001

 

Tony, thanks for taking the time to respond.

I have changed the line of code as you suggest and it takes us a step nearer to resolution, in that it no longer creates a 'duplicate' interaction, but updates the original. However, the original interaction remains in a state of closed, so the agent is initially unaware that this update has come in. In the logs I can see 2 entries:

Processed 'Reply Email Create Interaction', updated interaction and 

Received id=<LOYP123MB3277A196545AD1F00A336207F5FCA@LOYP123MB3277.GBRP123.PROD.OUTLOOK.COM> Classified as reply to 'IMS0123456' via watermark

 

I appreciate this is probably an impossible question for you to answer without knowing our setup, but given that the first few lines of script are to set

current.active = 'true'; 
current.state = 'new';

 yet the interaction remains closed, should we be looking at a different script/rule to manage the state on update?

Hi, try current.active = true;

as this should be a boolean value and you have it set as a string 'true'.

 

EDIT.
Also the 'state' value may be an integer - this is common for most SNC task table extensions.
You should be able to quickly validate this by checking xml of a relavent record.