1. Tasks
  2. Manage Whatsapp Stubsession

Tasks

Manage Whatsapp Stubsession

Manage a Whatsapp stubsession for a specific number.

The manage_whatsapp_stubsession task has the following operations:

  • set
  • delete

Basic usage

Delete a Whatsapp stubsession for a customer on the advanced_support Whatsapp profile.

editor
        {
  "tasktype": "manage_whatsapp_stubsession",
  "params": {
    "operation": "delete",
    "mobile_number": "~~stubpost.data.customer_number",
    "whatsapp_profile_name": "advanced_support",
  }
}

      

Parameters

operation

required
string

The operation to perform on the Whatsapp stubsession. The options are set and delete.

Default: null


mobile_number

required
string or number

The mobile number (cell phone number) for which to update the Whatsapp stubsession.

Default: null


stubref

optional
string

In the case of setting a Whatsapp stubsession, the stubref refers to the stub to set as active in the stubsession.

Default: ~~stub.stubref


whatsapp_profile_name

optional
string

The Whatsapp profile for which to update the Whatsapp stubsession. This optional parameter is only required if the org has multiple Whatsapp profiles.

Default: null


Result

loading...

Properties

message

string

A message on the result of the operation.


Examples

Setting a Whatsapp stubsession

Set a Whatsapp stubsession for the default Whatsapp profile.

editor
        {
  "tasktype": "manage_whatsapp_stubsession",
  "params": {
    "operation": "set",
    "mobile_number": "~~stubpost.data.customer_number",
    "stubref": "~~stub.stubref",
  }
}