1

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.

So that, we are using an AMPScript code in the SMS in MobileConnect outbound SMS. We have tried this:

%%[ 
    SET @idSubscriber = _subscriberkey 
    SET @rows = LookupOrderedRows("DE", 1, "ID_SUBSCRIBER Desc", "ID_SUBSCRIBER", @idSubscriber) 
    SET @RowCount = RowCount(@rows) 
    IF (Rowcount(@rows) > 0) THEN 
        VAR @ILRow, @name, @limit 
        SET @ILRow = row(@rows,1) 
        SET @name = Field(@ILRow, "DES_NOMPILA") 
        SET @limit = Field(@ILRow, "LIM_MC") 
    ENDIF 
]%%
1= %%=v(@idSubscriber)=%% 2= %%=v(@RowCount)=%%

We have recieved the SMS but the value of @idSubscriber is null. We have tried then with changing the Personalization string (found in ExactTarget documentation):

%%[ 
    SET @idSubscriber = CONTACT_KEY 
    SET @rows = LookupOrderedRows("DE", 1, "ID_SUBSCRIBER Desc", "ID_SUBSCRIBER", @idSubscriber) 
    SET @RowCount = RowCount(@rows) 
    IF (Rowcount(@rows) > 0) THEN 
        VAR @ILRow, @name, @limit 
        SET @ILRow = row(@rows,1) 
        SET @name = Field(@ILRow, "DES_NOMPILA") 
        SET @limit = Field(@ILRow, "LIM_MC") 
    ENDIF 
]%% 
1= %%=v(@idSubscriber)=%% 2= %%=v(@RowCount)=%% 

In this case we have not received the SMS.

Could you help us on how to access to the values of the Data Extension within Mobile Connect SMS, triggered by Journey Builder?

Than you very much.

1

I'd suggest trying the MOBILE_NUMBER personalization string for your lookup value.

%%[ 
    SET @idSubscriber = MOBILE_NUMBER 
    SET @rows = LookupOrderedRows("DE", 1, "ID_SUBSCRIBER Desc", "ID_SUBSCRIBER", @idSubscriber) 
    SET @RowCount = RowCount(@rows) 
    IF (Rowcount(@rows) > 0) THEN 
        VAR @ILRow, @name, @limit 
        SET @ILRow = row(@rows,1) 
        SET @name = Field(@ILRow, "DES_NOMPILA") 
        SET @limit = Field(@ILRow, "LIM_MC") 
    ENDIF 
]%%
1= %%=v(@idSubscriber)=%% 2= %%=v(@RowCount)=%%

The MOBILE_NUMBER is the subscriber key for SMS subscribers, since SMS and email opt-ins and opt-outs are handled separately in SFMC.

0

Have you set the Channel Address Order?

The Channel Address Order needs to be defined before a Send SMS Activity can be used to send SMS messages to Contacts.

The Channel Address Order determines which channel address field takes precedence over another for all send activities.

To define the Channel Address Order for Send SMS Activities, select the Contacts Configuration menu item in the Contact Builder app and from the SMS panel click on Edit, then Add Address and select the Attribute Group containing the mobile number, then click on Save. You can change the precedence of a channel address by dragging the row in the panel. When you’re finished, click on Save.

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.