Tangowork chatbot uses Contentful to help customers with legal problems

Published on February 18, 2021

Tangowork chatbot uses Contentful to help customers with legal problems

Looking for answers to your legal questions can be a daunting task. So many laws, so little time. And if you’re in the difficult position of unemployment or in the middle of contract renegotiations, you might not have much time to spare.

Thankfully, you can chat with Beagle if you live in British Columbia, Canada. Beagle can help answer your everyday legal questions quickly and pleasantly. The project is run by People’s Law School, a non-profit society in British Columbia dedicated to making the law accessible to everyone.

To create Beagle, People’s Law School partnered with Tangowork for their chatbot expertise and Agentic Digital Media for their design skills. Tangowork chose Contentful to manage content and Rasa to power the chatbot AI. In this post, we discuss the reasons we chose Contentful as our content platform and the way we approached tool integration.

beagle chatbot messenger screenshot

Contentful: One platform to manage content across channels

A successful chatbot requires a tremendous amount of content — having a chatbot tell you that it can’t answer your question isn’t a great experience. So Beagle’s team of lawyers spent several months writing and editing over three thousand replies across 71 topics.

We realized that the chatbot’s approachable and easy-to-read content deserved to live in several locations. After writing so many replies, it felt like a shame to use them in only one spot! We decided these helpful replies would also live on People’s Law School website. 

But no one liked the idea of managing content in two places. We explored the concept of a “headless” content management system — systems that manage just the content through APIs, leaving you to decide where that content is used. We tried them all, but nothing seemed to be mature enough for our project. 

Then we tried the Contentful content platform. Others had already used the platform to power chatbots, so we ran some experiments to see just how well it might fit our needs. We liked what we saw! 

Using Contentful and Rasa for the chatbot

We use Rasa, an open-source chatbot engine, to analyze input and decide how to respond. Rasa doesn’t generate language — all possible responses have to be written in advance. Rasa simply returns the name of a template to use. Then we retrieve that template from Contentful.

For example, in response to “i got laid off,” Rasa returns laidOff. Then a piece of middleware, built by our development team, calls the Contentful API and requests the content associated with laidOff. Contentful responds with the content, and then we format the text and send it to the chatbot:

beagle chatbot i got laid off

Content is delivered from Contentful straight to the chatbot.

Using Contentful for the website

The chatbot response to “i got laid off” works perfectly as the introductory paragraph to a webpage. The chatbot buttons, such as “What to know,” appear as website headings. Individual chatbot speech bubbles show as website subheadings and paragraphs. (Read more about the website project in How you can grow your website traffic 51%—overnight—by radically increasing speed.)

Using beagle chatbot for the website

Certain pieces of text aren’t appropriate for both the chatbot and the website. For example, we use emoji more liberally in chat. For those instances, we surround the text in question with a span tag like this: <span class="chatOnly">Cool, eh? 😎</span>. The text is then suppressed in the channel where it doesn’t apply.

Content model for I got laid off page

The Contentful editing interface is easy for content authors to understand.

Contentful beagle chatbot laid off message

Unified content management in Contentful makes high-quality content easier

People’s Law School has a rigorous standard for content. After multiple drafts by their legal content developers, content passes to a plain language reviewer, who performs another check to ensure it’s as clear and easy to read as possible. Finally, it’s reviewed for accuracy by an external lawyer.

 If this legal review process had to happen twice — once for website content and once for chatbot content — it would be unsustainable. Contentful allows us to manage a single set of content and publish it on a website and on a chatbot.

It doesn’t need to stop there. We can theoretically produce PDFs or other printed collateral via Contentful. We’re preparing for this expansion by using maximum-resolution images in Contentful’s media library in case we go down that path. (Contentful resizes and downsamples images on the fly for delivery to the website and chatbot.)

The lawyers at People’s Law School are thrilled with Contentful as their unified content management solution. “Contentful is fast, easy to use and flexible,” Drew Jackson, lawyer and project lead, says. “There’s nothing we’ve tried to do with it that it couldn’t handle. And I’m relieved that when the law changes, we don’t have to update both the website and the chatbot. We change the content once, and it updates everywhere.”

You can read more about how Contentful supports better digital experiences.

Subscribe for updates

Build better digital experiences with Contentful updates direct to your inbox.

Related articles

Illustration of a controller with the EA logo on it
Insights

From content management to content graph: shift to grow your business

May 3, 2021

Global companies often feel that they must choose between a globally consistent or locally specific content strategy. With the right content model, you can have both.
Insights

How to implement a local and global content strategy

September 7, 2020

Illustrated graphic of a group of people walking with shopping bags in front of several open brower windows
Insights

Why a content platform is the ecommerce solution for complex offerings

February 10, 2022

Contentful Logo 2.5 Dark

Ready to start building?

Put everything you learned into action. Create and publish your content with Contentful — no credit card required.

Get started