Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How to access values stored outside "Direct mail delivery"?

Avatar

Level 2

Does anyone know how to access values stored outside "Direct mail delivery"? I wanted to create a dynamic filename (as shown in below screenshot), based on timestamp happened before this component. I tried to access a variable defined in a js file that was loaded in loadLibrary(XXX.js), but it didn't recognize the variable; also tried to visit instance.vars.XXX, but still with no luck... Any solution for this?

1817126_pastedImage_3.png

8 Replies

Avatar

Employee

Hi,

You can add data outside of the delivery from the included box on the right of the input box (see the screenshot below)

1817283_pastedImage_0.png

Thanks,

Pulkit

Avatar

Employee

pablo.rosero

Please move this thread to Adobe Campaign Classic.

Thanks,

Pulkit

Avatar

Level 2

Hi Pulkit,

Thank for your response.

But if that means I need to create a dedicated column in target dimension to hold up the value, then I would rather treat it as a workaround: I could have 200 - 600 records in target dimension, in which case I may need to run a query to update all of them...

Thank,

David Zhang

Avatar

Employee

Have you try something like this 'filname_ <%= vars.executionTimeStamp%>'? This is work as well.

Thanks,

Pulkit

Avatar

Level 2

Not really, as what I wanted is a saved timestamp (in vars) when running a component, during the workflow run.

Anyway, currently I'm planning to address it in this way: create a fixed-name file (e.g. ABC.csv), then after it's done, use another JavaScript module to rename it to whatever I needed right away.

Thanks,

David Zhang

Avatar

Employee

The example in my previous response is using a variable defined in the workflow.

This is a standard use case; please consider all your options before 'over-engineering ' your solution.

Thanks,

Pulkit

Avatar

Level 2

Just tried, and got below error message:

"

The delivery has failed
XSV-350122 An error occurred and the process has been stopped. SOP-330011 Error while executing the method 'PrepareTargetImpl' of service 'nms:delivery'. DLV-490017 Error while computing the output file name. SCR-160012 JavaScript: error while evaluating script 'outputScript'. JST-310000 Error while compiling script 'outputScript' line 3: vars is not defined."

Thanks,

David Zhang