-1

I was wondering if anyone could help me to understand how to adapt the script found here.

to make it run from an automation and store each journeys into a row of a data extension (using the email studio character field limit trick to keep the full info)

I did run the script from a landing page, and the values exists, but seems like from automation studio while removing the Write() functions, it does not work for me.
So far, I've tried storing "item" and "items" but the results in the Data extension comes to an empty space in the data extension, or in an error of the script and I do not see why.

Thank you in advance for any assistance you could provide :)

1
  • 3
    Welcome to Salesforce Stack Exchange (SFSE)! Thank you for the information so far, but please edit your question to also add the code as you modified it from the linked code. (From What topics can I ask about here?: "Your question should include ...(the code, metadata, or design, in its current form)...") Be sure use the easy built in Markdown formatting in the SFSE editor - you can put three backticks (```) above & below code snippets to format it properly.
    – Moonpie
    Nov 17 at 12:18
0

Without your code to validate, I am going to guess the issue is that you are trying to place an object or an array into a string field. When objects or arrays are displayed in a string environment they return undefined or null. So when upserting item or items, I would put a Stringify() around them. This will turn the JSON into a JSON String and will be able to be stored in the data extension. This is similar to what you use to display it on the CloudPage.

So Stringify(items) should get you what you need.

Not the answer you're looking for? Browse other questions tagged or ask your own question.