This integration allows you to send WhatsApp message to any Workice client/contact mobile number.
You need to signup on https://wablas.com to get API key for WhatsApp
It has charges per message and may change based on countries
Wablas is an API for WhatsApp built to receive (and respond to) messages including text, link and emojis.
You need to signup with Wablas and connect your existing WhatsApp number in the Wablas Dashboard. You will receive an Token Key that will be needed to setup Workice WhatsApp Integration.
Step 1
Go to the Wablas Dashboard and connect your WhatsApp number then link your number.
For a guide on connecting your WhatsApp with Wablas check the documentation https://wablas.com/documentation
Step 2
You’ll receive a Token Key available on wablas dashboard (Click Devices > Choose your device and click Setting).
Copy Your Token from Wablas and paste it on Workice (Settings > System Settings > Wablas Token field.
Enter your WhatsApp number into (Settings > System Settings > WhatsApp Number field) example +254770XXXXXX
Receiving WhatsApp Messages
Go to your Workice App and copy WhatsApp webhook URL (Settings > System Info)
Paste the WhatsApp webhook URL you just copied into your Wablas Dashboard under Devices > Choose Device and click Setting > URL Webhook field.
Your webhook url should be https://{your-workice-url}/webhook/whatsapp/incoming/{your-cronkey} replace {your-workice-url} with your actual workice url e.g https://crm.example.com and replace {your-cronkey} with your cron key (available in Settings > System Info > Commands section} as shown below;

Example WhatsApp Webhook URL https://crm.example.com/webhook/whatsapp/incoming/34WI2L12L87I1A65M90M9A42N41D08A26I
Whenever a message is sent to your whatsapp number, wablas will send POST data to your workice installation. Workice will receive the data and if there is a lead with a phone number matching the message sender a new chat message is attached to the lead and visible in WhatsApp section of the leads view page.
If there is no lead with a phone number matching the message sender, Workice will search for a contact with the phone number and attach the message if it exists. The message is ignored if there is no lead or contact that has a number matching the message sender's number.
Sending WhatsApp Messages
Before you can initiate messages with yours users, they must first consent to receiving WhatsApp messages with an active opt-in. WhatsApp monitors closely the type of message you send. Sending unsolicited messages (SPAM) that your recipients are not expecting or want to receive, can result in WhatsApp permanently banning your number or IP. This is an action that WhatsApp takes, and we have no control or responsibility over it.
WhatsApp Opt-in
To start a conversation with a lead, open lead view and click WhatsApp tab.

Next to the lead phone number is a button named 'Subscribe' (with whatsapp icon).

Click on Subscribe button to initiate a chat with the lead. Once a lead replies to the message the button is hidden and you can now send and receive messages to/from the lead.
To receive or send messages to system users/contacts, they will need to activate WhatsApp by logging in to their account (Profile > Settings section) and check Receive WhatsApp Notifications then click Subscribe button to subscribe.
