Change your function to UpsertData, UpsertDE only works in emails:
Capture Mobile Number of Customer who Reply STOP
Debug that with hardcoded values instead of variables to eliminate errors in empty vars, the function or the matching to the data extension.
If it works with hardcoded data, start making the variables @id , @email, @phone dynamic again one by one, to see if your RequestParameter
functions work - to be honest, I wouldn't be surprised if the vars are plain empty as it is.
One simple thing is, you can simply use MOBILE_NUMBER
as @phone
, and lookup the other data by that:
Here is a nice strategy to do it, i.e. logging the mobile number, email and id already in the outbound message, together with a static "magic word".
In the 2nd SMS, look that Data Extension up by "mobile number + magic word"
Using AttributeValue function with SMS send inside a journey builder and you can keep using the same data throughout the conversation.
Limitation is: If you use the same mobile number for multiple IDs, this could confuse them.
======
In your edit, you ask about an if statement containing the keyword INFO not working.
Short answer: that's a "Verb", not a "Noun".
Long answer:
MobileConnect structures SMS into "Nouns" and "Verbs".
A "Verb" is a keyword that is sent in a message coming in through Mobile Connect. What comes after the Keyword are the "Nouns".
Keywords are not case sensitive (OFFER
is the same as offer
), neither is AMPScript.
Sample response:
OFFER my name is Peter
[MSG(0)] is the entire message:
OFFER my name is Peter
[MSG(0).VERB] returns the verb:
OFFER
[MSG(0).NOUNS] returns everything BUT the Verb:
my name is Peter
[MSG(0).NOUN(n)] returns the nth Noun aus, starting to count at 0:
my
Your message ("INFO") has no nouns. It only has a verb.
Change your if statement to use the verb:
IF [MSG(0).VERB] == "INFO" THEN
/* proceed */
END