Knowledge Base

Create Business Process

Bitrix’s business processes are a tool allowing you to order and automate routine processes:

  • External – for example, the processing of leads, deals and particular contacts;
  • Internal – for example, vacations approval or procurements alignment.

Some business processes or automation activities can be linked to your Wazzup profile to enable automatic message sending.

How does Wazzup work within Bitrix24 business processes?

Let’s look at an example of adding a business process to inform new leads that they can contact us via WhatsApp.

1. From the Bitrix24 CRM, go to “Business processes” as shown in the screenshot. A list of options will be presented to assign the business process to a lead, a contact, a company, or a deal.

2. In the “Lead” section, choose the “Add Template” function. The “Template Parameters” window will open. Set its name to be “Informing the lead about WA” and tick the “When added” option.

After saving the template, the business process editor will open. After configuring, each of the specific business process blocks will be carried out according to the predefined order.

In the “Business Processes” section, inside the lead’s card, you can see the statuses of existing business processes. Current states and dates of your business processes are presented here. The “Log” section shows activities and times. If a message gets “lost”, you can find it using its Message ID. If a message was not sent, check the status to understand what has caused the error.

The nodes of the diagram are activities. You can learn more about their functionality in the Bitrix video tutorials. Among them, there is the “Application Activities” one. If you choose it, Bitrix will send a WhatsApp message to everyone who has our application installed.

3. WhatsApp messages are sent using the lead’s phone number. However, it is not specified for all new leads. To check if the number is available, add the “Condition” option as shown in the screenshot. To open the menu, left-click the triangle in the diagram.

4. Click the cog symbol to open the activities parameters configuration window.

5. Fill in the conditions for the activities as shown on the screenshot, then press “Save”. Now the automation will check if the “Phone” field in the lead’s card is filled.

6. The condition branch for the case when the phone is not specified will lead straight to the an application action. They differ in the choice of channel for sending the message:

send a message to WhatsApp (outdated). This action is only available to users who have installed integration with Bitrix24 before June 1, 2021.

If there was no correspondence with the client yet, the message will go from the channel that was specified in the old integration settings before April 3, 2021.

If correspondence has already occurred, the message will be sent from the channel from which correspondence with this client was last carried out.

— send a message to WhatsApp from a specific channel. In the action settings, you can specify the phone number of the channel from which you want to send the message.

Even if there is already a chat with the client with another channel, the message will be sent from the number you specify.

— send a message to WhatsApp from the responsible person’s channel. The message to the client will be sent from the channel of the sales rep who is assigned to be responsible for it. If the sales rep has one channel, we will send from it, if they have several channels, we will send from the channel that is specified in the “From which channel to write first” setting of the integration settings.

7. In the settings of this activity, enter the message text and configure the recipient’s window. The options to fill in the field are available in the Bitrix tutorials. By default, the program offers you to use one of the values of the document (i.e. the lead upon the creation of which the process is executed) to populate it. The document contains many variables. For our purposes, we need the number. The “Phone” field can have several values, and the program cannot choose one of them by itself. Choose “Phone (text)” once.

Technically, Bitrix gives you the ability to choose several values, but if you decide to choose more than one, the business process will not work.

In the same window, input the message text. Now every time when you create a new lead, a message will be sent to the specified number to notify the lead that they can contact us via WhatsApp.

You can import information using different variables, not only in the “Recipient” but also in the “Message Text”. Using this function, you can address the client by their name or mention their e-mail. To open the menu, use the button to the right from the message input field.

Different channel statuses scenario

If the channel used for the dialogue before is not of the “Active” status:

  • For the “Just a minute”, “Phone not available”, “Opened in another place”, and “Log out from all devices” statuses, the message is queued and remains queued until the status is changed to “Active”. And then it is sent.
  • For the “Scan the QR code” status, the following message is sent: “Houston, scan the QR code”. This status usually appears when someone uses the “Log out from all devices” function.
  • For the “Offline”, “Deleted”, “Not paid” statuses, the following system message is sent: “Cannot send from this channel”. In this case, outgoing messages are neither sent nor queued. For this statuses, the system acts as if there was no previous dialogue. So, the message is sent using the default channel. In this case, all the dialogues from the previous channel are deleted.

How Wazzup selects phone numbers for messages from business processes

If there is one number in the contact card, Wazzup will check whether the number has WhatsApp. If WhatsApp is there, we’ll send a message, if not, we’ll return an error to Bitrix24.

It happens that the same customer has several numbers in the contact card. If Bitrix24 passed multiple numbers to Wazzup, then Wazzup will handle them as follows:

How to set one priority number if there are several numbers in the contact card

You can set a priority number when sending a message from Business Process. First we’ll try to send a message to it, and if it doesn’t have WhatsApp on it, we’ll check other contact’s numbers.

Let’s break this down with an example of a contact with 3 phone numbers. By default, when added, Bitrix24 assigns all numbers the type – “Working”. Let’s change one number type to “Mobile”. In our case, this number will not have WhatsApp.

Create a business process that will be triggered when a new deal is created. To do this, on the CRM page, go to “Settings” → “Automation” → “Business Processes” → ” Deal” → “+ Add Template”.

This will open a window with the template parameters. Under “Autorun”, check the “When added” checkbox.

Go to the “Variables” tab and click “Add Variable”. In the window that unfolds, fill in two lines: “Name” and “ID”. You can enter any values in Latin. Leave the type of variable as “String”.

Click “OK” and then “Save”.

Now create an action to send a message to the contact’s “Mobile”. Click on the triangle → “Application actions” → “[WAZZUP] send message thru whatsapp”.

On the created action, tap the gear. The “Action Parameters” window will open. Next to the “Phone number” line, press the three dots button.

You want the message to be sent first to the “Mobile” from the contact card. To do this, select “Mobile (text)” in the list that opens. Below enter the message you want to send to the client and press “Save”.

When you perform this action, Wazzup will ask Bitrix24 for the “Mobile” from the contact and check it. If there is a WhatsApp account associated with the number, a message will be sent to it — task accomplished.

If Wazzup finds that the number does not have a WhatsApp account, it will send an error to Bitrix24. We need to configure Business Process so that when it receives an error, Wazzup looks for WhatsApp on the rest of the contact’s numbers.

Click on the triangle between the WhatsApp sending action and the “End” → “Other” → “Set Variables” button. Now click on the gear on the “Set Variables” action.

Make sure the same variable you created is selected in the drop-down menu. Next to this line, click on the button with the three dots.

Click the “Additional Results” link in the window that opens → “[WAZZUP] send message thru whatsapp” → double-click “…Response code”:

In the line with the variable the code should appear.

Click Save.

Now you need to set a condition. To do this, under the “Set Variables” action, click triangle → “Constructions” → “Condition”. On any of the branches, click the gear on “Condition”.

Select “Condition Type” — “Variable Value”, from the drop-down list “Property or Field” — your variable, “Condition” — “equals”, in the “Value” line type “405”.


Click on the triangle below the condition you configured → “Application actions” → “[WAZZUP] send message thru whatsapp”. On the created action, click the gear.

You need Bitrix24 to take all the numbers from the contact card and send them to Wazzup. Next to the “Phone number” line, click the three dots button and select “Phone (text)”. Enter the message you want to send to the customer and click “Save”.

The business process is ready. Save it.

In the example above, Bitrix24 passed “Mobile” to Wazzup. Wazzup did not find WhatsApp on the number and returned an error code 405 to Bitrix24. After receiving the error, Bitrix24 sent all the contact numbers to Wazzup. Wazzup checked them and sent a message to the number from WhatsApp. In the Workflow log it will be recorded as follows: