Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!

How to retrieve Delivery Content post execution?

Avatar

Level 7

Hello Folks,

I am using a simple campaign workflow, it looks somehow like below:

START -> QUERY -> RECURRING DELIVERY -> (Some Activity like JS) -> Update -> End

Initially i will target few recipients and trigger an email for them. Now i am trying to modify by placing an activity preferably JS, where i have to fetch the content that is present in the delivery and update to a schema. How to fetch it is i am not getting, any Pointers please, quick help is appreciated

Reards,

Sri Bhargav

10 Replies

Avatar

Level 7

Hello All,

When searching over web, i came across the below API Document. But couldn't find any examples/sample demos for using in Adobe Campaign.

https://docs.campaign.adobe.com/doc/AC/en/jsapi/s-nms-delivery.html

Any pointers plz?

Regards,

Sri Bhargav

Avatar

Level 8

Hello,

Hope the below link will help you

A/B testing

Regards,

Venu

Avatar

Level 7

Hi Venu,

Thank you for your response!

But content is coming from AEM Page. Here's the flow FYI

Content is created in AEM -> Synced in Campaign Delivery -> Email Sent -> Then I wanted the content to be retrieved here?

Regards,

Sri Bhargav

Avatar

Community Advisor

Hi,

Select [content/html/source] from the delivery in your js' querydef.

Thanks,

-Jon

Avatar

Level 7

Hi Wodnicki,

Thanks for your pointer! Now i am able to get the content from the delivery inside the Script activity present in delivery itself.

Is there any way so that i can able to fetch only URL's that are present in the delivery. I don't need full content though

PS: I understand that URL's list can be retrieved from nms:trackingUrl schema for a particular delivery. But point to note is, i am unable to track any of the URL as they are not static, hence they are not visible in that schema, until and unless i can able track then only i can retrieve from that schema. So going by alternative approach.

Regards,

Sri Bhargav

Avatar

Community Advisor

Just parse them out with regex. From https://digitalfortress.tech/tricks/top-15-commonly-used-regex/, collect matches in content with:

/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#()?&//=]*)/

Avatar

Level 7

Thanks Jon. It worked and i am able to get whatever i needed. Thanks all for your help and pointers

Avatar

Level 7

Hi Jon,

Retrieving this long back thread, You mentioned to use "Select [content/html/source]" for retrieving the Delivery Content. However i used delivery.content.html.source in the Script Activity of Delivery.

But when I observed, i am not getting updated content from AEM (since content is auto-refreshed during Delivery Analysis), I am getting same old content which is synced very first time.

I tried using JS with queryDef too, But no luck. Could you please help me how to get updated content of the delivery?

Regards,

Sri Bhargav

Avatar

Community Advisor

Hi,

Use nms.delivery.aemGetContent(delivery).

Thanks,

-Jon

Avatar

Level 7

Thanks Jon, Will try it out and let know in other thread if any issues