Error in delivery analysis ‘content htmlContent’ line 19: recipient is not defined

This article explains why the ‘content htmlContent’ line 19: the recipient is not defined error occurs during the delivery execution for a recipient.

Description description

Environment

  • Campaign Classic
  • Campaign

Issue/Symptoms

The following error occurs during the delivery execution for a recipient:

'content htmlContent' line 19: the recipient is not defined. SCR-160012 JavaScript: error while evaluating script 'content htmlContent'

Resolution resolution

This happens when you use a target mapping in a delivery that is different from the incoming data in the delivery activity of a workflow. So suppose you queried the recipient table and passed it to delivery, and in the delivery, you have a custom target mapping, then you will get this error.

Secondly, if you are using a custom target mapping in delivery and it has any personalization block or any column referencing in its content, and you use the recipient object, you will get this error. E.g., if you call recipient.id or recipient.email.

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f