Your outbound message from Content Builder can't contain this code - for your unsub process to work, you actually need to have 2 messages:
- A message from the
Text Response
template that's configured in Mobile Connect which needs to be set up on a new keyword (likeUNSUB
). Here you need to implement the code you had before or the code I posted below. - Your initial text message from Content Builder will now have to use the
Next Keyword
option - you need to set it to your new keyword (likeUNUSB
). This option will not appear in Content Builder, but will be displayed in Journey Builder in Advanced Options when you configure your SMS for sends.
This will work this way:
Your outbound message gets sent to the customer and the system will know thanks to the Next Keyword
that it should treat all incoming text (probably for a limited time period like an hour) as if it was coming to your Text Response message configured on the Unsub
keyword.
Any tests of the Text Response keyword can be done by just sending the keyword. You won't get any information about sender of the sms apart from the number, so you will need to do lookups based on this information to your data.
Old answer before the comments posted below
I think I had the same issue, as I never could get [MSG(0).NOUN(0)]
to work while using a Text Response template, so I went with a workaround:
set @inbound = [MSG(0)]
set @verb = [MSG(0).VERB]
set @message = Trim(Replace(@inbound, @verb, ''))