0

we have an eamil that use a conbination of a JSON and Data Ext. to personalize it, right now we need to insert into a data ext, a date that come from the JSON file, and the date that the user recieve the email to use this data for a exclusion script into a journey, where this email belong. We put the the insert funtion in the main email and this block for us the preview sendings and the sends inside the journey that we created.

This is the code, that we are using and give us trouble :


%%[

set @formatFecha = Format(@from, "mm/dd/yy")
set @fechaVuelo= DateParse(@formatFecha,0)



InsertDE("Fecha_Vuelo","SubscriberKey",_subscriberkey,"EmailAddress",emailaddr, "Date", @fechaVuelo, "EventDate", NOW() )


]%%

We also try this, thinking that the date formatting can cause the error


%%[

set @fechaVuelo= StringToDate(@from)



InsertDE("Fecha_Vuelo","SubscriberKey",_subscriberkey,"EmailAddress",emailaddr, "Date", @fechaVuelo, "EventDate", NOW() )


]%%

We just try almost everithing, like set all the common variables like emailaddr or _subscriberkey and didn't work either, if someone can give us an alternative we are going to be the happiest nerds of the planet!!

4
  • Hello @user114187, can you provide a sample value of the @from variable? I'm pretty sure the issue comes from the initial format of your date that cannot be converted correctly
    – Niko
    Commented May 3, 2022 at 11:29
  • Can you share the error it is throwing that prevents you from rendering it? This can help us to figure out what the issue could be. Commented May 3, 2022 at 13:26
  • Hello everyone, @from bring us a String in this format "dd/MM/yy" and we want to convert it into a date and introduce it in the data ext. "Fecha_Vuelo". Salesforce is not showing a error message, we can preview well the email and send it without problem but never recieve the mail and in the journey we can see how the user go through it but never send anything.
    – user114187
    Commented May 4, 2022 at 10:04
  • I would check the NotSent Data Extract (help.salesforce.com/s/…) or NotSentEvent SOAP Object (developer.salesforce.com/docs/marketing/marketing-cloud/guide/…) to see if you can get the description of why the emails did not send live to help troubleshoot your issue. Commented May 5, 2022 at 13:29

1 Answer 1

-1

it's probably because there is an issue with the target data extension. We had the same problem and it was because we had one field set as a primary key that we were not specifying inside the ampscript.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .