tufu
Start free
Docs menu

Set up

Install on WordPress

The tufu AI plugin puts the support chat, the Ask console and tufu forms on a WordPress site, with no code. Connect it in a minute.

On this page

The tufu AI plugin adds the support chat bubble to your WordPress site, and gives you blocks and shortcodes for an Ask console on your docs pages and for tufu forms. You don't edit your theme or paste any code, and no API key is involved.

Before you start#

  • Your site needs WordPress 6.5 or newer, and PHP 7.4 or newer.
  • You need to be an administrator of your WordPress site, and an admin of your team in tufu. No tufu account yet? You can create a free one while you connect.

1. Install the plugin#

In WordPress, go to Plugins → Add New Plugin and search for tufu AI. Press Install Now, then Activate. It's tufu AI in the WordPress plugin directory.

2. Connect to tufu#

Go to Settings → tufu AI and press Connect to tufu.

The tufu AI settings page in WordPress before connecting: Your bot, a line saying only the bot's public IDs come back, the Connect to tufu button, and Enter IDs instead under Settings

Your browser goes to tufu, which names your site at the top: check it's yours. Sign in, or create a free account, then pick the bot your site should show. You only see the teams you're an admin of. If the plan has room, you can also choose A new bot: tufu makes a public support chat named after your site, and you teach it your site afterwards under Knowledge.

tufu's connect page for help.acme-outfitters.example: the team's bots to pick from, the support chat chosen, a new bot as another choice, and the Connect button

tufu picks a public bot to start with (your team's default bot when it's public). Depending on the bot you pick, tufu may need to change two things, each with a box:

  • Make the bot public. Only for a private bot, and unticked until you tick it: the chat on your site needs a public bot, and a public bot can be reached by anyone, on your site and at its public link.
  • Add your site to the bot's allowed websites. Only when the bot already has a list on its Where it appears page and your site isn't on it. A bot with no list shows on any site, and tufu leaves it that way.

Press Connect followed by your site's name (for example Connect example.com), and you're back in WordPress with the bot saved.

The tufu AI settings page after connecting: Connected, the bot help of the team acme, the Open your inbox on tufu button and the Check it's live on tufu link, and the buttons Connect a different bot and Disconnect

Only the bot's public team and bot IDs come back to your site, the same ones in any page that shows the bot. No password or key reaches WordPress, and the plugin stores nothing secret. Each connect request works once and expires after 30 minutes; if it does, press Connect to tufu again.

Check it's live on tufu opens the bot's Put it on your site page in tufu, which says whether the chat has loaded on your site yet ("Live on" your site, with the last time it loaded). Open your site in another tab first if it's still waiting; with Hide the chat bubble from logged-in admins on, use a private window.

Connect a different bot runs the same steps again. Disconnect removes the bot from your site; nothing from tufu loads on it until you connect again.

Enter IDs instead#

Prefer to type them? Under Settings, open Enter IDs instead and fill in Team ID and Bot ID, then press Save Changes. The bot's Put it on your site page in tufu shows both in the snippet: team="your-team" and bot="your-bot". The bot must be public.

Nothing from tufu loads on your site until a team and bot are saved: not the bubble, and not the Ask console block or shortcode.

Where the bubble appears#

Once connected, the chat bubble shows on every page of your site. It never shows in the WordPress dashboard, on the login page, or inside a page builder's editor such as Divi's Visual Builder or Elementor (see Install on Divi). In Settings → tufu AI you can change:

  • Support chat: untick Show the chat bubble on my site if you only want the Ask console or forms.
  • Shows as: A chat bubble in the corner, or An Ask bar: a search box at the bottom center of every page that answers from your docs and opens the Ask console upward. Ctrl+K (⌘K on a Mac) opens it, unless the page has its own tufu Ask box, which keeps the shortcut.
  • Admins: hide the bubble from logged-in admins while you work on the site.

Which pages it shows on is set on the bot's Where it appears page in tufu (see Where your bot appears); its position and button text are on the bot's Look tab.

The Ask console on a page#

For a search box that answers from your docs, edit a page and add the tufu Ask block. In the block's settings you can change the placeholder text, or set another Bot ID to use an Ask console bot instead of the one in Settings.

If your page builder doesn't use blocks, use the shortcode:

Text
[tufu_ask]
[tufu_ask placeholder="Search the help"]
[tufu_ask bot="your-docs-bot" hotkey=""]

placeholder is the text in the box, hotkey is the letter that opens it with Cmd or Ctrl (hotkey="" turns the shortcut off), and bot uses another bot of the same team. A second bot needs the Starter plan or above. The team is always the one in Settings → tufu AI, so a page can't show another team's bot.

Forms on a page#

Build the form in tufu under Forms (see Forms), then put it on a page in either of two ways:

  • The tufu Form block. Add it to a page and press Choose a form in tufu: you pick the form there and come back with it in the block.
  • The shortcode. Settings → tufu AI → Forms lists your site's forms, each with its shortcode to copy, such as [tufu_form id="..."].

A tufu form is a real HTML form: it sends with JavaScript off and on cached pages (steps then show as one page). Every message lands in your tufu inbox. Change the form in tufu and the page follows within five minutes.

Move my forms#

Using Ninja Forms, WPForms or Contact Form 7? While it's active, Settings → tufu AI → Move my forms finds its forms. Press Bring them to tufu, sign in, pick the team and the forms, and confirm: tufu makes a copy of each, with its AI off. Only the forms' fields, titles and replies are sent, never their entries, and your forms in the other plugin stay as they are.

Back in WordPress, each moved form has Show this form where the old shortcode is. Tick it, and once you deactivate the old plugin, its shortcodes show the tufu form instead, so you don't edit your pages. tufu AI never deactivates another plugin for you.

In a page builder#

Elementor, Divi, Beaver Builder and the like don't use blocks, so add the Ask console or a form with its shortcode: in Elementor, a Shortcode widget; in Divi, a Code module (see Install on Divi). The chat bubble needs nothing: WordPress adds it to every page whichever builder made it, and it stays out of the builder's editor while you design.

WooCommerce orders#

With WooCommerce, your bot can answer "where's my order?" for a customer who's logged in to your store: their latest order's status, date, total, items and tracking, or the order whose number they give. It uses Look it up, on the Team and Scale plans. You write no code. How each answer is made, step by step, is in How "Where's my order?" works.

  1. In tufu, open the bot's Look it up tab and press Make the secrets. Copy both: they're shown once.
  2. In WordPress, go to Settings → tufu AI → Signed-in visitors and orders. Paste the identity secret and the signing secret, tick Sign in logged-in users, and press Save. Copy the Order lookup address shown there.
  3. Back on the Look it up tab, press WooCommerce orders under Add a lookup. Paste the address into Address, check the rest, and press Add lookup.
  4. Press Test with your own WordPress user ID (under Users, in the address of your profile) to see what the bot will see. Then log in to your store and ask the chat about an order.

Guest checkouts. For customers who didn't log in, also press WooCommerce orders (guests) on the Look it up tab, paste the same address, and add it. The bot asks for the order number and the email the order was placed with, and the plugin answers only when both match (the email in any case, extra spaces ignored).

The plugin never puts the visitor's token in your pages' HTML: the page fetches it from your site after it loads, so a page cache can't hand one customer's token to another.

If it doesn't work:

  • Test says the address can't be reached, or redirects. Copy the address again from Settings → tufu AI, exactly: tufu doesn't follow redirects, so http instead of https, www. or a missing / all fail.
  • A security plugin or Cloudflare blocks it. tufu's requests come with the user agent tufu-lookups/1.0. Allow it for /wp-json/tufu-ai/v1/orders in your firewall or security plugin.
  • Your site turns off the REST API. The order lookup lives there. Allow /wp-json/tufu-ai/ in the plugin that turns it off.
  • It worked, then stopped. Making a new secret in tufu stops the old one at once. Paste the new one in Settings → tufu AI straight away.
  • The chat doesn't know who's logged in. Check Sign in logged-in users is ticked, and that you're not testing as a logged-out visitor. Turning it on applies to chats started after that.

Branding#

The chat and the Ask console show a small "Powered by tufu" link. On the Scale plan, or on Starter and Team with the brand removal add-on, you can hide it on the bot's Look tab. The plugin itself works the same on every plan.

Updating#

WordPress updates the plugin from the directory like any other: new versions show under Dashboard → Updates, and you can turn on auto-updates for it in Plugins.

Removing it#

Deleting the plugin in Plugins removes its settings, its list of forms, and any secrets you pasted, from your site (from every site, on a multisite network). Your bot, your forms and their conversations stay in tufu.

Troubleshooting#

  • The bubble doesn't show. Check Show the chat bubble is ticked and the page isn't ruled out on the bot's Where it appears page. If you changed the bot in tufu since connecting, check it's still public and its allowed websites include your site. If you're logged in as an admin, check Admins isn't hiding it from you.
  • "That connection expired or was already used." Press Connect to tufu again. A connect request works once, for 30 minutes.
  • tufu says only a team's admins can connect a site. Ask an admin of your team to connect it, or to make you an admin.
  • I changed a setting and nothing happened. Clear your caching plugin's cache (WP Rocket, W3 Total Cache, LiteSpeed Cache and the like) and your host's page cache. Changes made in tufu itself reach your site within five minutes.
  • Cloudflare Rocket Loader. The plugin asks Rocket Loader to skip tufu's script. If the bubble still doesn't show, turn Rocket Loader off for your site in Cloudflare (Speed → Optimization), or exclude tufu-chat.esm.js in your optimization plugin's JavaScript settings.
  • "Combine" or "defer" JavaScript settings. Optimization plugins that bundle scripts can break tufu's. Exclude tufu-chat.esm.js from them.