Chatilo
USDPrices shown in US dollars Sign in Start free trial

Install the WordPress plugin

Add the chat widget to a WordPress site, send WhatsApp order updates from WooCommerce and add a "Chat on WhatsApp" button, all from one plugin.

Last updated

On this page
  1. Before you start
  2. Step 1: Install the plugin
  3. Step 2: Create an API key
  4. Step 3: Connect the plugin
  5. Show the chat widget
  6. Send WooCommerce order updates
  7. Add a Chat on WhatsApp button
  8. What happens next
  9. Common problems
  10. Pages, forms and phone verification

The WordPress plugin connects your WordPress site to Chatilo. It does three things, and you can use any of them on their own:

  • Shows your Chatilo chat widget on the site.
  • Sends WhatsApp order updates from WooCommerce when an order is placed, completed, cancelled or refunded.
  • Adds a "Chat on WhatsApp" button anywhere with a shortcode.

The plugin's menus and labels use the name Chatilo, whatever name your installation carries.

There are two ways to send WooCommerce order messages. This plugin sends them from WordPress, with a tick box at checkout and four order events. The other way uses webhooks and needs no plugin; see Connect a WooCommerce store. Use one of the two, not both, or customers get each message twice.

Before you start

  • You need admin access to your WordPress site (WordPress 5.8 or later, PHP 7.4 or later).
  • You need the plugin file chatilo.zip. Ask the person who runs your Chatilo installation for it.
  • For order updates: you must be a workspace owner or admin to create an API key, and your plan must include API access (shown on plans as "API, Zapier and CRM sync").
  • For order updates: you need a connected WhatsApp number and at least one approved template. WhatsApp only lets a business message a customer first with a template that Meta has approved. See Create a template.
  • For the chat widget: create a widget first. See Create a chat widget. The widget needs no API key.

Step 1: Install the plugin

  1. In WordPress, go to Plugins → Add New Plugin and click Upload Plugin.
  2. Choose chatilo.zip and click Install Now.
  3. Click Activate Plugin.
  4. Go to Settings → Chatilo.

Step 2: Create an API key

Skip this step if you only want the chat widget or the button.

  1. In Chatilo, in the sidebar under Automate, click API and webhooks.
  2. In the API keys card, click New key.
  3. In Key name, type WordPress. Under Access, keep Read and write selected.
  4. Click Create key and copy the key from the green box straight away. It is not shown again.

Step 3: Connect the plugin

  1. In WordPress, on Settings → Chatilo, enter the address where you open Chatilo in Chatilo address, starting with https://, with nothing after the domain.
  2. Paste the key into API key.
  3. Click Save settings.
  4. Click Test connection. A green message shows your workspace name.

The page never shows the key again. It only shows the last four characters. To replace the key, paste a new one and save.

Show the chat widget

  1. In Chatilo, in the sidebar under Grow, click Chat widget and open your widget.
  2. In the Add it to your website card, click Copy.
  3. In WordPress, paste the copied line into Widget key. The plugin picks the key out of it.
  4. Tick Add the chat widget to every page of this site.
  5. Click Save settings and open your site. The chat button appears in the corner.

Two options control where it appears:

OptionWhat it does
Hide for administratorsLogged-in WordPress administrators do not see the widget. Visitors still do.
Hide on these pagesPage or post IDs, separated by commas. The widget is left off those pages.

Do not also paste the widget code into your theme, or the site loads it twice.

Send WooCommerce order updates

This part of the page appears only when WooCommerce is active.

  1. Tick Send WhatsApp messages when an order changes status.
  2. In Customer consent, choose how customers agree to messages. The choices are explained below.
  3. Change Tick box text if you want. Left empty, it reads "Send me order updates on WhatsApp".
  4. In Contact tag, type the tag each customer gets in your contacts, for example WooCommerce customer.
  5. In the What to send table, for each event you want: tick Send, and type the name of an approved template in Template name. Approved templates are suggested as you type once the connection works.
  6. In Body values, write one line for each numbered variable in the template body, in order. See Template variables and samples.
  7. Click Save settings.

The choices under Customer consent:

ChoiceWhat the customer sees
Optional tick box at checkoutA box they may tick. Only customers who tick it get messages.
Tick box the customer must tickThey cannot place the order without ticking it.
No tick boxA short notice instead. Every customer gets messages. Check what the law in your country asks for first.

The four events:

EventWhen it is sent
New orderWhen the order's status becomes Processing or On hold.
Order completedWhen the status becomes Completed.
Order cancelledWhen the status becomes Cancelled.
Order refundedWhen the status becomes Refunded (a full refund).

Values can be fixed text or these fields: {{first_name}}, {{last_name}}, {{customer_name}}, {{order_number}}, {{total}}, {{status}}, {{order_date}}, {{payment_method}}, {{items}}, {{order_url}}, {{store_name}}.

For example, for a template that reads "Hi {{1}}, we have your order {{2}} for {{3}}.", write these three lines in Body values:

{{first_name}}
{{order_number}}
{{total}}

Language is only needed when the template exists in more than one language. Header value is the header's variable, or a public link to the image, video or document if the template has a media header.

Add a Chat on WhatsApp button

  1. On Settings → Chatilo, enter Your WhatsApp number with the country code and save.
  2. Edit a page or post and add a Shortcode block with:
[chatilo_button text="Hi, I have a question" label="Chat on WhatsApp"]

The button opens WhatsApp with your number and the text already typed in. To use a different number on one button, add number="+919876543210". The button works without an API key.

What happens next

  • Each order is messaged once per event. The message is sent in the background, so the checkout is never held up, even if Chatilo cannot be reached.
  • Every message, sent or failed, is written as a note on the order in WooCommerce, with the reason when it failed.
  • The customer is added to your contacts with the tag you chose, and the message appears in a conversation in the inbox. See Tags.
  • Deleting the plugin from WordPress removes its settings and the saved key. Order notes stay.

Common problems

Test connection says "Send your API key as: Authorization: Bearer <key>."

The key is wrong or was deleted in Chatilo. Create a new key and paste it again. Also check that Chatilo address has nothing after the domain.

"Connected, but this API key is read-only"

The key was created with Read only access. Create a new key with Read and write and paste it in.

"API access isn’t part of this workspace’s plan."

Your plan does not include API access. The chat widget and the button still work; order updates need a plan with API access.

No message was sent for an order

Open the order in WooCommerce and read the order notes. If there is no note from the plugin, the customer did not tick the box at checkout, the event is not ticked in What to send, or it has no template name. Orders you add by hand in WordPress have no consent recorded and are not messaged.

Order note: "No approved template with that name and language on this number."

The template name is misspelt, the template is not approved yet, or it belongs to another WhatsApp number. Check the name on the Templates page, fill in Language if the template exists in several, and pick the right number in Send from.

Order note: "the order has no usable billing phone number"

The customer left the phone field empty, or the number is too short. Make the phone field required at checkout. A number typed without a country code gets the calling code of the billing country.

Order note: "This contact has opted out of messages."

The customer replied STOP earlier. They are not messaged until they opt back in. See Opt-outs.

The widget does not appear

Check that Add the chat widget to every page of this site is ticked, that you are not an administrator with Hide for administrators on, and that the widget is active in Chatilo. If you limited the widget to certain websites, add this site's domain. See Add the widget to your website. Clear any caching plugin after changing the settings.

For WhatsApp's own errors see Messages not sending.

Pages, forms and phone verification

Version 1.1 of the plugin adds three shortcodes:

  • [chatilo_page slug="your-link-name"] embeds a page you built under Pages and forms: a form, a store, tickets, an invitation, appointments, a poll or bill payments. Add button="Book now" to show a button that opens the page instead, and height="1100" to change the height.
  • [chatilo_pages kind="form"] lists your published pages as links. Leave kind out for all of them.
  • [chatilo_verify_phone template="login_code"] shows a box that sends a one-time code on WhatsApp and checks it. Use channel="sms" for SMS. The verified number is saved on the logged-in user. For your own code, the chatilo_phone_verified action runs with the number and the user id.

These need the API key saved in the plugin settings. See Put a page on your own website and API: pages, forms and one-time codes.

Cookies on this site

We use the cookies needed to run the site and keep you signed in. With your OK we also remember choices you make here, such as the currency for prices. We don’t use advertising or tracking cookies. Cookie policy