Expand my Community achievements bar.

We are excited to introduce our latest innovation to enhance the Adobe Campaign user experience — the Adobe Campaign v8 Web User Interface!

Store Event XML in Instance Variable

Avatar

Level 2

Hi there

I am trying to understand how I extract an XML data node and store it within an instance variable inside a workflow. I've tried looking everywhere for help on how to do this but cannot find anything. I have limited JS knowledge but am assuming this must be possible somehow. Below are some examples of the XML and what I am currently trying within the workflow. Any help would be appreciated.

XML looks like this:

<ctx>

      <UUID>cab2ed30-4864-439b-a2bf-73ec5a42ff17</UUID>

      <CUSTOMERNAME>Mr 238396</CUSTOMERNAME>

      <POLICYNUMBER>ABC123456</POLICYNUMBER>

      <COVER_START>18-04-2018</COVER_START>

      <COVER_END>17-04-2019</COVER_END>

     </ctx>

Then within a JavaScript code node I have this:

var ctx = XML(ams.<companyname>MessagingEventQueue.ctx);

instance.vars.custName = ctx.CUSTOMERNAME;

Cheers

Chris

0 Replies