1

I'm trying to configure dynamic from and reply Sender Profiles using AMPscript. The overview in the Support Portal leaves something to be desired:

Create a Dynamic RMM Configuration

I have two Data Extensions -

  1. CustomerContact (my main customer list - includes RepID field)
  2. SendasSalesRep (my Sales Rep table - SalesName, SalesFromeMail, SalesReplyeMail, RepID)

I have four Content Areas -

  1. %%=Lookup("SendasSalesRep","SalesReplyeMail","RepID",RepID)=%%
  2. %%=Lookup("SendasSalesRep","SalesName","RepID",RepID)=%%
  3. %%=Lookup("SendasSalesRep","SalesFromeMail","RepID",RepID)=%%
  4. %%=Lookup("SendasSalesRep","SalesName","RepID",RepID)=%%

Here are the iterations of AMPscript I have tried. All have failed.

1st Try: Will not save to Sender Profile - Throws this error:

(A problem occurred updating your sender profile. Please contact Customer Service for additional information. Name: Neutron Industries - Send as Rep External Key: 82 Invalid Sender Profile state. ClientID: 7296105 SenderProfileID: e5939ac4-fed1-e611-b70d-1402ec67bf94 Sender Profile Name: Neutron Industries - Send as Rep CustomerKey: 82The FromName AMPScript contains the following errorsInvalid Function Call - "ContentArea("SendasSalesRepSendNameDynamic")"The FromEmail AMPScript contains the following errorsInvalid Function Call - "ContentArea("SendasSalesRepSendAddressDynamic")"The FromEmail AMPScript contains the following errorsInvalid Function Call - "ContentArea("SendasSalesRepReplyAddressDynamic")"The FromName AMPScript contains the following errorsInvalid Function Call - "ContentArea("SendasSalesRepReplyNameDynamic")"

  • From Name: %%=ContentArea("SendasSalesRepSendNameDynamic")=%%
  • From eMail: %%=ContentArea("SendasSalesRepSendAddressDynamic")=%%
  • Reply Name: %%=ContentArea("SendasSalesRepReplyNameDynamic")=%%
  • Reply eMail: %%=ContentArea("SendasSalesRepReplyAddressDynamic")=%%

2nd Try: Saves without error - Gets canceled after send

  • From Name: %%=ContentAreaByName("my contents\SendasSalesRepSendNameDynamic")=%%
  • From eMail: %%=ContentAreaByName("my contents\SendasSalesRepSendAddressDynamic")=%%
  • Reply Name: %%=ContentAreaByName("my contents\SendasSalesRepReplyNameDynamic")=%%
  • Reply eMail: %%=ContentAreaByName("my contents\SendasSalesRepReplyAddressDynamic")=%%

3rd Try: Saves without error - Gets canceled after send

  • From Name:%%=ContentArea("1138")=%%
  • From eMail: %%=ContentArea("1137")=%%
  • Reply Name: %%=ContentArea("1136")=%%
  • Reply eMail: %%=ContentArea("1135")=%%

Any help will be very appreciated.

  • You should add any error messages you encounter verbatim. – Adrian Larson Aug 3 '17 at 20:42
  • I believe there is a Business Rule that Support needs to turn on as well. – victorcorey Aug 3 '17 at 20:55
2

I'd suggest starting with adding the AMPScript for all four content areas to the body of your email to ensure they function properly.

Your #2 and #3 examples should work, but without knowing what's in your content areas, we don't have much to go on.

Update

I'm not a big fan of utilizing raw personalization strings. It's much better to code it defensively, assuming that either RepID won't exist in the sending audience or won't be found by the lookup. Here's an example for the reply email:

%%[

var @RepID, @sendName
set @RepID = AttributeValue("RepID")
set @sendName = Lookup("SendasSalesRep","SalesReplyeMail","RepID", @RepId)

if not empty(@sendName) then
  output(concat(@sendName))
else
  output(concat("Your Friend"))
endif

]%%

You can put this in a Content Area and reference in the RMM config, or you can paste it directly in the RMM field.

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.