3

We need to allow people to unsubscribe from an SMS that is sent through Journey Builder. We bring them to a Cloud Page where they confirm they want to unsubscribe. We also need to unsubscribe them from SF and hence in MC.

I am trying with this formula within the SMS and I didn´t even receive the message.

%%[
 var @Id, @shortenUrl, @bitlyUrl, @link, @PhoneNumber
 set @Id = RequestParameter('Id')
 set @Id = RequestParameter('PhoneNumber')
 set @link = URLEncode(CloudPagesURL(434,'Id',@Id,'PhoneNumber', ))
 set @bitlyUrl = 'bitly_link'
 set @shortenUrl = HTTPGet(Concat(@bitlyUrl,@link,"&format=txt"))
]%% 

Code in the Confirmation Cloud Page:

%%[
 SET @Phone= RequestParameter("PhoneNumber")
 SET @Id= RequestParameter("Id")
]%%

Code in the processing page to update field in SF:

%%[ 
 SET @Phone=RequestParameter('PhoneNumber') 
 SET @Id=RequestParameter('id') 
 SET @Baja=Lookup('DE_Baja_SMS','Baja','Id',@Id) 
SET @FDC=UpdateSingleSalesforceObject('Contact', @Id, 's360a__CommunicateViaSMS__c', @Baja) ]%%
4
  • You've got a syntax error on this line in your SMS script: set @link = URLEncode(CloudPagesURL(434,'Id',@Id,'PhoneNumber', )). There's an extra comma. Commented Jul 11, 2018 at 11:59
  • And why did you choose RequestParameter() to retrieve the Id and PhoneNumber from the send context? Commented Jul 11, 2018 at 12:00
  • @AdamSpriggs thanks for pointing out the Sintax Error. I did choose the Request Parameter to pass the subscriber from the SMS to the last Cloud Page. I don´t find the way of unsubscribing someone in the Sales Cloud from an SMS sent through Journey Builder
    – Daniel
    Commented Jul 11, 2018 at 17:50
  • Hey @AdamSpriggs - I have the exact same requirement but can't seem to figure out how to unsubscribe the contact in MobileConnect. Were you able to achieve this ? If so, would you mind sharing some pointers?
    – Vic
    Commented Aug 8, 2018 at 18:46

0

You must log in to answer this question.

Browse other questions tagged .