0

I am trying to create a dynamic sender profile, but only change the sender name based on the sales rep associated to the record.

I essentially have 3 tables I need to work with. The sending data extension, which has UserID and EmailAddress.

The data extension with the connecting data, has Territory and UserID

And my Sales Reps data extension data with, SalesRepName and Territory

So I am needing to connect my sending data extension to my Sales Reps data extension and pull the sales reps name associated with the territory of my subscriber.

I was trying to use the lookup function with AMPscript in an email first to see if I can get it to generate a value, but every time I use it it just shows up blank.

%%[

var @Territory, @SalesRep, @UserID

set @UserId = "%%UserID%%"

set @Territory = Lookup("BR_Call","Territory_vod__c","UserID","@UserID")

set @SalesRep = Lookup("TerritoryVOD","SalesRep","UserID","UserID")

]%%
<br>
<br>
%%=v(@Territory)=%%
<br>
<br>
%%=v(@SalesRep)=%%
0

1 Answer 1

1

Seems like there is a typo in your code

set @UserId = [UserID]
set @SalesRep = Lookup("TerritoryVOD","SalesRep","UserID",@UserId)
1
  • I made the corrections you recommended and it didn't work at first. I created a whole new email to test it on and it worked fine. I'm not sure what was going on with the first one, but this fixed my issue!
    – RunRabbit
    Jan 20, 2021 at 20:18

You must log in to answer this question.

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