In order to personalize our SMS - Journey Builder send, we need to use the values of the fields of the Data Extension that trigger de Journey Builder. This is perfectly possible with an email send, but the same AMPScript functions
do no seem to work with the SMS. The only personalization string seems to be the MOBILE_NUMBER
. Thank you
2 Answers
The code example that you provide in your comment uses the _subscriberkey
personalization string, which specifically relates to an email Subscriber in the All Subscribers list. MobileConnect uses it's own list model.
There are two personalization strings available for mobile messages; MOBILE_NUMBER
and SHORT_CODE
. Also, there are some AMPscript variables for mobile messages that can also be used in mobile messages.
-
Hi Eliot, ok I understand. So no way to directly use the entry event Data Extension, unless you use a LOOKUP function. This may prove to be complicated when the mobile number is not unique KEY in the entry event (instead if you could just use the ). Thanks– sdmc01Commented Sep 13, 2016 at 11:03
-
1Yes, indeed. While you can use personalization strings in Send Email Activities using fields from the Event Source Columns in Data Extension, sadly this does not appear to apply to Send SMS Activities (I've tried). This is unfortunate. Commented Sep 13, 2016 at 18:33
The 2016 response from Eliot Harper is now outdated.
Currently you can insert very simple AMPscript snippets into your message to insert subscriber-specific data into your SMS. The format is %%=v(FieldName)=%%
where "FieldName" is the name of a column (field) in the Data Extension you are using for your Journey's Entry Source.
Example full text of a personalized message:
Hello %%=v(FirstName)=%%, here's your confirmation message.
code
%%[ SET @idSubscriber = _subscriberkey SET @rows = LookupRows("DE","CustomerID",@idSubscriber) SET @RowCount = RowCount(@rows) IF Rowcount > 0 THEN set @row = row(@rows,1) set @coupon = field(@row,"Coupon") ENDIF ]%% %%=v(@coupon)=%%code
Thank you