ENS Workflow Event Code Samples

Workflow Events

WORKFLOW_QUEUE_ASSIGN

For WORKFLOW_QUEUE_ASSIGN events, initially the old value tag contains a null value and the new value tag contains the email address of the agent being assigned a transaction. When a suspect order first enters the queue, an agent is assigned automatically. That assignment is registered as an update so that agent’s email address is recorded in the new value tag. If the lead agent is reassigning a transaction from one agent to another, the old value tag will contain the original agent’s email address and the new value tag will contain the new agent’s email address.

In the Agent Web Console (AWC) in Suspect Orders, when the lead agent opens the agent menu, only the initials of available agents appear, rather than their full email addresses. This is done in the GUI to conserve space. The actual value transmitted when the assignment is made is the actual email address.

<event>
  <name>WORKFLOW_QUEUE_ASSIGN</name>
  <key order_number="?" site="?">Transaction ID </key>
  <old_value>old email address </old_value>
  <new_value>new email address </new_value>
  <agent>agent@email.com </agent>
  <occurred>2019-09-05 13:19:24 </occurred>
</event>

WORKFLOW_STATUS_EDIT

For WORKFLOW_STATUS_EDIT events, there are multiple values: order declined (D), order approved (A), order requires review (R), order escalated (E), blank (null). Typically, R is the initial value and A or D is the new value. E is the same, except you might see R as the initial value and E as the new value. It is possible to see the reverse or other combination of the initial and new value. For example, if a user accidentally approved or declined a transaction and wants to put it back to review, or if a user changes it from approved directly to declined.

The key order_number is the ORDR value.

You can get multiple events in each ENS POST. You must only process WORKFLOW_STATUS_EDIT events. For example, you must ignore the DEM_EMAIL_ADD events. You might also receive multiple WORKFLOW_STATUS_EDIT events. For the following example, you must ignore the DEM_EMAIL_ADD events:

<?xml version="1.0" encoding="UTF-8"?>
<events merchant="999999" total="2"> 
<event>   
  <name>DMC_EMAIL_ADD</name>   
  <key>TEST@MENOW.com</key>   
  <old value></old value>   
  <new value>decline</new value>   
  <agent>abc1@keynetics.com</agent>   
  <occurred>2010-12-01 12:11:21</occurred> 
</event> 
<event>   
  <name>DMC_EMAIL_ADD</name>   
  <key>JOHN@TEST.com</key>   
  <old_value></old_value>   
  <new_value></new_value>   
  <agent>def2@keynetics.com</agent>   
  <occurred>2010-12-01 13:19:24</occurred> 
</event>
<event> 
  <name>WORKFLOW_STATUS_EDIT</name> 
  <key order_number="O70470358" site="DEFAULT">KC5G08MYP3V1</key> 
  <old_value>R</old_value>  <new_value>A</new_value> 
  <agent>agent@email.com</agent> 
  <occurred>2019-05-11 08:56:14</occurred>
</event>
<event>
  <name>WORKFLOW_STATUS_EDIT</name>
  <key order_number="?" site="?">Transaction ID</key>
  <old_value>Old Status</old_value>
  <new_value>New Status</new_value>
  <agent>​agent@email.com​​</agent>
  <occurred>2019-05-11 08:56:14</occurred>
</event>

WORKFLOW_NOTES_ADD

<event>
  <name>WORKFLOW_NOTES_ADD</name>
  <key order_number="?" site="?">Transaction ID </key>
  <old_value>null </old_value>
  <new_value reason_code="code">New Note </new_value>
  <agent>agent@email.com </agent>
  <occurred>2019-09-05 13:19:24 </occurred>
</event>

WORKFLOW_REEVALUATE

<event>
  <name>WORKFLOW_REEVALUATE</name>
  <key order_number="?" site="?">Transaction ID </key>
  <old_value>Old Score </old_value>
  <new_value>New Score </new_value>
  <agent>agent@email.com </agent>
  <occurred>2019-09-05 13:19:24 </occurred>
</event>

 

Was this article helpful?
0 out of 0 found this helpful