0

We have a scenario where the same content is published across multiple sites, and we want to send the same email to the different sites from their related business units. The branding in the email is straight forward enough, but we want the links in the email to point to the appropriate domain related to the business unit.

Assuming that the links are the same, just with different domains:

I hate to create a copy of the email for each send in each BU and run a replace on the domain, but maybe some AMPScript that would change the contents of the email at send time based on the sending BU? Is there another mechanism that I'm not aware of that could simplify this?

  • It might be better/easier to have the URL stored inside the sending data source. Either in the Trigger Call or in the sendable data extension. That way you can wrap it in a RedirectTo() to still include link tracking. e.g. %%=RedirectTo(@Link1)=%% which will insert the associated link in the data. Another option is to have each BU have a DE with the same name/key and store the links inside of that in each BU. The lookup AMPScript will only access DEs inside of the corresponding BU, which will allow customized links depending on the BU used. – Gortonington Jun 29 '18 at 13:07
0

In Shared Data Extension store BU MID as Primary Key and link assigned to that BU. Ten you can use %%memberid%% personalization String as value for lookup and get your link from a DE. Given your DE columns are 'MID' and 'Link', code would look something like this:

set @memberId = AttributeValue('memberid')
set @linkData = LookupRows('DE_WITH_BU_AND_LINK', 'MID', @memberId)
if RowCount(@linkData) == 1 then
    set @urlBase = Field(Row(@linkData, 1), 'Link')
else
    RaiseError('No link for BU found', true)
endif
  • Thanks, this is very helpful. What I'm stuck at now is how to perform a find/replace on the contents of the email. I could just work with the content producers to use AMPScript (i.e. href="%%=v(@domain)=%%/path/to/content/") when they are creating the content, but it would be much better if they could just use a single domain as they are editing the content and we could dynamically replace it with the domain associated with the sending BU. Is there a way to access the content of the email? – Mark Ransom Jun 28 '18 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.