5

Does anyone know the send time variables for Mobile Connect?

I'm used to e.g. @subcsriberkey = _subscriberKey, but what are the equivalent for mobile connect?

1 Answer 1

4

Refer to this page for a complete list of personalization strings available within MobileConnect.

Retrieving Email Subscriber details from MobileConnect

The good news is that SubscriberId in Email Demographics matches the ContactId in the Contact model. So to retrieve the Subscriber Key of the Contact in an SMS, you can lookup the _ContactID from the mobile data view and then use this to retrieve email subscriber details from the Subscribers data view.

Use the following code in a MobileConnect message template to send an SMS containing the Subscriber Key and Email Address of a Contact:

%%[
var @contactId, @subscriberKey, @emailAddress
set @contactId = Lookup('_MobileAddress','_ContactID','_MobileNumber',MOBILE_NUMBER)
set @subscriberKey = Lookup('Ent._Subscribers','SubscriberKey','SubscriberID',@contactId)
set @emailAddress = Lookup('Ent._Subscribers','EmailAddress','SubscriberID',@contactId)
]%%
Subscriber Key: %%=v(@subscriberKey)=%%
Email Address: %%=v(@emailAddress)=%%

Note if you are sending from the Parent Business Unit, then you can remove the Ent. prefix.

I've tested this by sending an SMS to myself and it works fine.

7

You must log in to answer this question.

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