0

Using AMPscript in one on my email campaigns, I'm pulling data together (from a DE) based on if a family/ single person share the same Policy Number. I then pull their SubscriberKey (ID), Relationship (Type), First and Last Name into a table within the email. A bit like the below table.

Type            Last Name, First Name      ID
Primary Insured Fruit, Watermelon          2163913
Spouse          Fruit, Papaya              2163914
Child           Fruit, Durian              2163917
Child           Fruit, Longan              2163915
Child           Fruit, Lychee              2163916

AMPscript is as followed...

 %%[ 
set @PolicyNumber = AttributeValue("Policy_Number")
IF NOT EMPTY(@PolicyNumber) THEN
set @rows = LookupRows("Policy_data","Policy_Number",@PolicyNumber)
set @rc = RowCount(@rows)

for @i = 1 TO @rc DO
set @row = Row(@rows, @i)
set @fName = Field(@row, "first_name")
set @relationship = Field(@row, "relationship")
set @subscriberkey = Field(@row, "SubscriberKey")
set @lName = Field(@row, "Last_Name")
]%%
<tr>
  <td>%%=v(@relationship)=%%</td>
  <td>%%=v(@lName)=%%, %%=v(@fName)=%%</td>
  <td>%%=v(@subscriberkey)=%%</td>
</tr>
%%[next @i
endif]%%

Table I used.

Policy_Number|Last_Name|First_Name|SubscriberKey|Relationship|EmailAddress
1|Fruit|Watermelon|2163913|Primary Insured|[email protected]
1|Fruit|Papaya|2163914|Spouse|
1|Fruit|Durian|2163917|Child|
1|Fruit|Longan|2163915|Child|
1|Fruit|Lychee|2163916|Child|
2|Pie|Apple|90251091|Primary Insured|[email protected]
2|Pie|Cherry|90251092|Spouse|
3|Baker|Yummy|90257611|Primary Insured|[email protected]
3|Baker|Junior|90257700|Child|
4|Ice Cream|Chocolate|90251111|Primary Insured|[email protected]

The code work and I tested it out on several bits of data with 4 email addresses. All worked and pull the correct data. I then changed those four email addresses to colleagues of mine to show them. But I still received the emails and they didn't. I was wondering if there could be any caching going on? And if so, how to clear it with the DE?

Thanks!

1 Answer 1

2

Email addresses are stored in All Subscribers list, you need to change them there.

Go to Email Studio > Subscribers > Lists > All Subscribers and Search by Subscriber Key and update emails in All Subscribers - emails in Data Extension only matter for the first send.

In Salesforce Marketing Cloud, the All Subscribers list is a master list of all people, or Subscribers, who can receive email communications from your organization. When an email is sent from the platform and the Subscriber does not exist in the All Subscribers list, they are appended to it as a new record. Now, Subscriber email addresses can change. In most scenarios, the platform applies email address changes to the Subscriber record at send time, but in certain scenarios, you may need to update Subscribers email addresses in the All Subscribers list before sending an email, to ensure that it’s sent to the correct email address.

Source and video: https://mc.chat/subscriber-email-address-update-behavior/

1
  • Ah, of course! Appreciate the quick response! Thank you!
    – rom29
    Commented Jun 17, 2021 at 10:49

You must log in to answer this question.

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