EndSmsConversation()

End an active SMS conversation with a contact.

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.

Important

Availability 

Marketing Cloud Engagement ✅ Yes
Marketing Cloud Next ❌ No

Syntax 

1EndSmsConversation(originationNumber, destinationNumber)

The EndSmsConversation() function has two 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.

Usage 

Use this function while there’s an ongoing conversation with a contact. To use this function, pass it your short or long code, and the phone number of the contact.

1%%=EndSmsConversation("12345",MOBILE_NUMBER)=%%

This function always returns true if successful, and an exception if it fails. For this reason, we recommend against using this function for decision making.

Note