Hooky17
Hooky17

Reputation: 47

Kentico Email Widget using custom contact fields

I'm creating an email template using Kentico's email marketing module. In which I have an email widget that retrieves and fills in holiday detail parameters based on some custom contact field values therefore making this dynamic for each user.

How can I pass custom contact fields in to the widgets from the recipient? The recipient object only contains set values.

Contacts for this email campaign are collected from a form submission that passes in the required values.

<div style="display:none;">
    {% holidayDate = Recipient.GetValue("holidayDate"); #%}
    {% holidayId = Recipient.GetValue("holidayId"); %}
    {% ItineraryData = customNamespace.GetItineraryItem(holidayId, holidayDate) #%}
</div>

<h2 class="price">{% ItineraryData.GetValue("Price") #%}</div>

Something like the above is what I am trying to achieve but I can't seem to work out how to get these custom fields to use in the email widget.

Thanks, Luke

Upvotes: 0

Views: 441

Answers (1)

Brenden Kehren
Brenden Kehren

Reputation: 6117

The documentation states Recipient only has 4 available fields:

  • FirstName
  • LastName
  • Email
  • PersonaID

If you want to get custom fields, you'll have to look up the contact by the email address, first and last name in a macro.

Upvotes: 1

Related Questions