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?
Refer to this page for a complete list of personalization strings available within 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.
_MobileNumber
as the documentation indicated but that did not work (it did not send the SMS). It appears that the personalization strings referenced in the documentation actually refer to the MobileAddress Data View and are not personalization strings. (help.marketingcloud.com/en/documentation/ampscript/…). I will let the documentation team know.
Apr 11, 2017 at 18:20