---
schema_version: "1"
id: 837191bd0e298b1ccf317bf789411f8d56f75bae233d3ccf1a81e82e810f971d
title: SetSmsConversationNextKeyword()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/ampscript/references/sms/mc-ampscript-reference-sms-set-sms-conversation-next-keyword.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sms/mc-ampscript-reference-sms-set-sms-conversation-next-keyword.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: df6c7e60339de373932dd059b439b43f734de31fd83e2bf24d43ebe6eecdccd1
products:
  - AMPscript for Marketing Cloud
  - Marketing Cloud
---
# SetSmsConversationNextKeyword()

Sets the keyword for the next conversation path based on an SMS response from an SMS recipient, without initiating a new conversation. Use the current keyword or a new keyword for a different conversation path. The function directs the current conversation to the next keyword to use as part of the overall conversation.

**important:** You can only use this AMPscript function in MobileConnect.

You can’t use this function with conversation-based templates, including Double Opt-In and Info Capture templates.

## Availability

<table>
  <tr>
    <td>Marketing Cloud Engagement</td>
    <td>✅ Yes</td>
  </tr>
  <tr>
    <td>Marketing Cloud Next</td>
    <td>❌ No</td>
  </tr>
</table>

## Syntax

```
SetSmsConversationNextKeyword(originationNumber, destinationNumber, keyword)
```

The `SetSmsConversationNextKeyword()` function has three parameters:

- `originationNumber` (string): Required. The phone number (such as a short code or long code) used in MobileConnect.
- `destinationNumber` (string): Required. The contact’s phone number, including the country code.
- `keyword` (string): Required. The string to set as the next conversation keyword.

## Usage

To use the function, pass it the phone number that you use in MobileConnect, the contact's phone number, and a keyword.

```
%%=SetSmsConversationNextKeyword('12345',MOBILE_NUMBER,'EXAMPLE')=%%
```

The conversation is moved to the new path indicated by the keyword and proceeds from there. The function doesn’t set the keyword immediately, but rather when the contact sends the next message.
