Author
Dustin DyeStrategy
June 15, 2022

AI-powered Contact Center Solution for Franchise Owners.

Let’s put ourselves in the shoes of a smart & ambitious franchise owner looking to upgrade their support system. 🥾👞👠

The key Botcopy feature I’ll be highlighting for the ultimate franchisee use-case will be our custom snippet parameters.

Custom snippet parameters are one of my favorite Botcopy features: they allow companies to pass a parameter from your Botcopy snippet on a specific page, to your agent, so that you can trigger the relevant intent.

This is what your snippet should look like once you’ve manually added data-snippetRef=”yourCustomValue”:

<script
type="text/javascript"
id="botcopy-embedder-d7lcfheammjct"
class="botcopy-embedder-d7lcfheammjct"
data-botId="yourBotID"
data-snippetRef="yourCustomValue"
>
var s = document.createElement('script');
s.type = 'text/javascript'; s.async = true;
s.src = 'https://widget.botcopy.com/js/injection.js';
document.getElementById('botcopy-embedder-d7lcfheammjct').appendChild(s);
</script>

Below is an example function to be used in Dialogflow’s fulfillment. Here we are peeling off the parameters from botcopy-ref-context

function snippetTest(agent) {
agent.requestSource = agent.ACTIONS_ON_GOOGLE

// 'botcopy-ref-context' has the passed values
// it has a lifespan of 2 intents
const context = agent.context.get('botcopy-ref-context')
// We're destructuring the value of botcopySnippetRefValue off the context
const {
parameters: { botcopySnippetRefValue }
} = context
// Here you would use botcopySnippetRefValue within an HTTP call,
// create a new context with the response,
// and reference that context throughout the conversation,
// but for this example we're just displaying the value sent.
// See the query ref implementation for an example of using the HTTP call.
agent.add(`Snippet value = ${botcopySnippetRefValue}`)
}

Before we dive into more technical jargon let’s get a better understanding of WHY a franchise would benefit from this setup.

Problem: Most franchises experience similar customer support inquires. Common examples would be:

  1. Hours of operation
  2. Schedule an appointment
  3. Inventory available

While the questions are similar, the responses may vary by store location. Let’s use inventory for today’s example.

Scalable Solution

As a franchise, it’s fairly common to have a variant of inventory and pricing within different locations. Instead of creating a new bot for every location, we can use or create a database that stores inventory info about each location.

Take a look at the example database below. Here we have an inventory list from a franchise in Los Angeles and New York. Both are selling the same product but have different inventory and prices based on market factors in their area. (Overhead, shipping, supply-demand, etc.) A centralized database is the first step toward a scalable intelligence solution. Below we have created a rudimentary inventory database.

There’s a reason we’re highlighting LA, Product X. Continue reading.

Let’s forget this is AI for a second. If you have a sales rep who gets a phone call, it may go a little something like this:


Sales Rep LA: Hi, thanks for calling Jiffy Lube, Los Angeles. How can we help you today?
Customer: Hi, I’d like to know if you guys have any Product X in stock?
Sales Rep LA: (looks at the spreadsheet for Los Angeles. Finds Product X and its available / price.) Yes, we do! We have Product X in stock for $79.95. Currently, we have ten left in our on-site inventory. Would you like to purchase and have it ready for pick up?

The sales rep was able to identify that the customer was calling with questions about product X for the Los Angeles location. The above scenario seemed to work well in this example. But, when the customer experience often fizzles is when you have hundreds of customers trying to contact your business and the sales rep can only handle so many conversations at a time.

Luckily, for innovative businesses using AI tech, this fizzling will become a thing of the past. Franchises are always on the lookout for potential savings and don’t want to pay out for repetitive tasks if they can be brilliantly automated for less. Plus, customers grow tired of smooth jazz music while on hold.

Let’s not abandoned this manual operating system completely though. (Yet.) There’s still a lot we can learn from it! Things we need to train your AI to do to handle this situation above as well as this sales rep did:

  1. Find out what location the user has questions about.
  2. Once the location is found, pull info from the database for that location.

Now, let’s head back to the tech jargon armed with a better understanding of why.

The key to training the AI on how to serve up the right inventory for a particular location is the URL.

For example, let’s imagine each franchise has a different subdomain for each location. The URL /location. The parameter would look something like 👇

const {
parameters: { www.franchise.com/LosAngeles}
} = context

The secret sauce for the AI is recognizing that location as the Dialogflow ES context and Dialogflow CX state handler. When a user comes from that location or URL the AI automatically set’s the context/state accordingly by using Botcopy’s parameters.

Dialogflow ES Example

Now that your location context/state is set your Dialogflow agent can scan your inventory database for information with that context tagged.

Dialogflow ES Slot Filling

Slot filling to a database in action.

Above you can see slot filling in action. The sentence structure is something we could reasonably expect a user to ask. Words like “in stock” are identified as slot filling for @sys.location. The inventory is telling the agent what product and in that location to look for. Now the bot understands what the user is looking for and can serve up the information accordingly.

The response then fills in the $Inventory for that $product and can also pull additional information such as $pricing. See below.


Finally, the best part: Making it look amazing. That’s where Botcopy’s front end comes in.

“Yes we do! We currently have 10 product x’s in stock for $79.95. Would you like to purchase and have it ready for pick up?”

🌋

And there you have it. An AI-powered chat assistant that can instantly talk intelligently about your current inventory, from any location. Imagine the time and money savings, not to mention how much simpler this will be for your customers. And this is just one example. The sky’s the limit!

We hope this created a light bulb moment. 💡

Feel free to share below, your thoughts and ideas about this approach. Or, reach out to our Pro Support team if you have questions or need help. We’d love to hear from you! Email us at support@botcopy.com.

Till next time.

Dustin