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.

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.

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.

To use the function, pass it the phone number that you use in MobileConnect, the contact's phone number, and a keyword.

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.