---
schema_version: "1"
id: 9e74cd99a1499441c5d7eff6d2502e72b033447c31cc2d801aac416a54e8420e
title: AMPscript Functions for Mobile Messages
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/ampscript/guide/language-basics/mc-ampscript-guide-language-basics-mobile-functions.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/guide/mc-ampscript-guide-language-basics-mobile-functions.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 60e971fd70c56c515edfa59339f89fc51b6ccf2e9148bffc63c9baf5ec384253
products:
  - AMPscript for Marketing Cloud
  - Marketing Cloud
---
# AMPscript Functions for Mobile Messages

Use these functions with mobile messages that you send using MobileConnect. These functions return values that only apply to mobile messages. You can’t use these functions in email messages, landing pages, or other content types.

- `Msg(0)`

  - : The [Msg()](/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sms/mc-ampscript-reference-sms-msg.html) function returns the entire content of a mobile-originated (MO) message. A mobile-originated message is a message sent from the mobile device of a subscriber to your SMS phone number. Compare MO messages to mobile-terminated (MT) messages, which are messages that you send to a subscriber’s mobile device.

    The function only accepts a value of `0` as its parameter.

- `Verb`

  - : The [Verb](/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sms/mc-ampscript-reference-sms-verb.html) helper function, used together with `Msg(0)`, returns the keyword from an MO message. The function doesn’t accept any arguments. It can only retrieve the current keyword specified in MobileConnect. For example, if the keyword is “OFFER” and the MO message is “OFFER 2065550042”, then the function `Msg(0).Verb` returns a value of “OFFER”.

- `Nouns`

  - : The [Nouns](/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sms/mc-ampscript-reference-sms-nouns.html) helper function, used together with `Msg(0)`, returns all of the message content that follows the keyword. For example, if the keyword is “OFFER” and the MO message is “OFFER John Smith”, then the function `Msg(0).Nouns` returns a value of “John Smith”.

- `Noun()`

  - : The [Noun()](/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sms/mc-ampscript-reference-sms-noun.html) helper function, used together with `Msg(0)`, returns a specific word in a mobile message. This function requires you to pass a parameter that indicates the position of the word in the message. A value of `0` indicates the first word in a message after the keyword, a value of `1` indicates the next word in a message, and so on. For example, `Msg(0).Noun(1)` returns the second word in the message after the keyword.

- MMS_Content_URL()

  - : The [MMS_Content_URL()](/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sms/mc-ampscript-reference-sms-mms-content-url.html) function returns the URL of incoming MMS content used in a mobile message. This function works only with MobileConnect accounts when sending MMS messages. You must retrieve and store this data within your own system for later usage. For example, you can send the URL to another program that distributes the content residing at the URL to another person for review. We recommend that you use this feature with an approval filter in Media Share and Media Response message templates to prevent unauthorized content from reaching your contacts.

    This function requires you to provide the ordinal of the MMS content contained in the MO MMS message. A value of `0` indicates the MMS content in the current MO message.

## Usage Examples

These examples illustrate common use cases for mobile-specific functions in SMS messages.

### `Msg(0)` and `Noun()` Functions

This example checks the MO message for the presence of a specific word.

```
%%[
  Var @msg
  If (Uppercase([Msg(0).Noun(0)]) == "PARTY") then
    Set @msg = "Downtown Luxury Hotel, 7pm, May 2"
  Else
    Set @msg = "We're sorry, but that's incorrect"
  EndIf
]%%

%%= v(@msg) =%%
```

If the MO message contains the specified word, the value of the `@msg` variable contains a string that provides additional information. If the MO message contains a different word, then the variable contains a string that tells the subscriber that they provided the wrong keyword.

### MMS_Content_URL() Function

In the Media Share template, enter an outbound response.

```
Thanks for Responding YOURKEYWORD %%=MMS_Content_URL(0)=%%.
```

The outbound message takes the URL of the MMS content from the incoming MO message. You can then take the URL and forward it to another source, such as an external site or an RSS feed.

## Other Functions

In addition to these mobile-specific functions, you can also use the [InsertData()](/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-data-extension/mc-ampscript-reference-data-extension-insert-data.html) and [DeleteData()](/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-data-extension/mc-ampscript-reference-data-extension-delete-data.html) functions in MobileConnect messages.
