To automate the process of storing user opt-outs from your WhatsApp Campaigns and keep the Opt-out List updated in real time, you need to integrate your Virtual Assistant with the Engage API. This process can be done in Studio for your available system or application.
Within the example JSON, you will find two possible interaction flows, one for Opt-out and another for Opt-in. Both flows illustrate how a Virtual Assistant can be integrated with the Engage API to store user preferences regarding campaign messages.
Keep in mind that these flows are just reference examples; you can customize the experience according to your needs and communication style.
Download the JSON with the example flows here.
To implement and test these flows in your environment, follow these steps:
- Download the example JSON
Access the JSON file from the provided link and save it to your device. - Import it into your Studio instance
Log in to your Studio instance and use the import option to upload the flow from the downloaded JSON file. - Add “Step In” nodes
Insert Step In nodes at the necessary points of the flow to configure the Virtual Assistant's content according to your desired experience. - Configure credentials in the "Prepare request credentials" nodes
In these nodes, enter a valid username and password with access to the Engage platform. - Add the X-Token in the "Prepare request Opt-in" and "Prepare request Opt-out" nodes
In these nodes, you must enter the X-Token corresponding to your WhatsApp channel. You can request this token directly from your Customer Success Manager.
All set! 
Once you complete these steps, your bot will be ready to test the experience of storing the user preferences for WhatsApp campaigns in the Audience section within Engage.