Facing target data error while triggering email | Community
Skip to main content
Level 3
October 6, 2023
Solved

Facing target data error while triggering email

  • October 6, 2023
  • 2 replies
  • 814 views

Hi All,

 

Facing below error while trigerring real time emails, Could anyone please help in resolving this issue? Emails are not getting delivered.

 

Error while compiling script 'content htmlContent' line 8: targetData is not defined. SCR-160012 Javascript: error while evaluating script 'content htmlContent'.

 

Thank you

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ParthaSarathy

Hi @rut7 ,

Reason is, In your delivery there will be syntax like <%=  targetData.______ %> , This syntax in delivery will expect target data from input transition. if there is no such target data, then you will be getting this error.

  <%= targetData.field123 %> 

 

Solution:

If you use a workflow,

Search for those targetData in your delivery, and in your workflow, add it as additional data using enrichment.

Example, if you have script  <%= targetData.field123 %> in delivery, create an enrichment before your delivery > add an output column as @field123

 

 

If you use SOAP API Request (transactional message), then modify target data <%= targetData._____ %> with syntax as below, (Depends on your Payload Request structure)

 

2 replies

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
October 6, 2023

Hi @rut7 ,

Reason is, In your delivery there will be syntax like <%=  targetData.______ %> , This syntax in delivery will expect target data from input transition. if there is no such target data, then you will be getting this error.

  <%= targetData.field123 %> 

 

Solution:

If you use a workflow,

Search for those targetData in your delivery, and in your workflow, add it as additional data using enrichment.

Example, if you have script  <%= targetData.field123 %> in delivery, create an enrichment before your delivery > add an output column as @field123

 

 

If you use SOAP API Request (transactional message), then modify target data <%= targetData._____ %> with syntax as below, (Depends on your Payload Request structure)

 

~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups
LakshmiPravallika
Community Advisor
Community Advisor
October 6, 2023

Hi @rut7 ,

 

For Real time emails, the syntax which should be used in Transactional Templates would be <%=rtEvent.ctx.@email %>

 

As the Data is not coming from Schema, instead it should be picked from external Request , this syntax needs to be used.

 

Regards,

Pravallika.