I'm unsure as to what is happening here. Where are the values of the set variables coming from? Is this all filler text where we would put in our mobile number and other values? Can more variables be set other than those that are listed here?

Set @mobile = v([MOBILE_NUMBER])
Set @mobile1 = Substring(@mobile,2,10)
Set @keyword = v([MSG(0).VERB])
set @noun = lowercase([MSG(0).NOUN(0)])
set @url = Concat("http://finance.example.com/d/quotes.csv?s=CRM&f=snd1l1yr",@mobile1,"&alert_keyword=",@keyword)
set @msg = [MSG(0)]Set @message = HttpGet(@url)]%%
example.com Stock is: %%=ProperCase(@message)=%% Thanks for Responding!

Thank you very much for your time. Please let me know if I am being unclear

1 Answer 1


This is AMPScript for an inbound (MO) message. The personalisation strings are populated by the context. Details of variables available in an MO message can be found here:


There are a few other variables available as personalisation in SMS here:


  • I see an example of setting an AMPScript as a response to an inbound message with a keyword on this page. Is there a way to set up an AMPScript for an inbound response to an SMS that I originally sent via a http POST within my application? Or do AMPScripts have to be tied to a specific keyword texted to a specific short code? Thank you for all the help!
    – MikeAC
    Dec 11, 2015 at 13:39
  • Hey Mike, Forgetting the documentation and Marketing Cloud terminology, what are you actually trying to achieve? Subscribe a contact and send them an SMS from your application?
    – Macca
    Dec 13, 2015 at 0:49
  • I have an existing MVC website. I would like to add a text box and button to a page on the site. The user will input their mobile phone number and click this button. When clicked I want to send the user a text message. Upon receiving the text message, I would like the user to be able to respond to the text message with a picture message. I would like to upload this picture message to AWS or post it to a WebApi controller within my application that can upload the picture to AWS. Does that make sense? Thank you for all of your help thus far. I appreciate it.
    – MikeAC
    Dec 14, 2015 at 14:12
  • something else I was wondering was how an image is retrieved from a picture message. I see the MMS_CONTENT_URL() function listed on this page you linked me to. Does marketing cloud store the MMS content at that URL? Should I be able to post that url to my api controller from the AMPScript and then upload the image from that url to AWS? Sorry that I can't try this for myself yet; I found out that my account does not include mobile connect
    – MikeAC
    Dec 14, 2015 at 16:12

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.