---
title: "Chatbot Scripts: 13 Templates for SaaS and Online Stores"
canonical: "https://www.thrivedesk.com/blog/chatbot-scripts/"
author: ThriveDesk
description: "Learn how to write chatbot scripts: a 7-step method and 13 copy-ready templates for SaaS and online stores, plus how to set them up as an AI agent."
categories: [blog, customer-support]
---

# Chatbot Scripts: How to Write Them, With 13 Templates for SaaS and Stores

Learn how to write chatbot scripts: a 7-step method and 13 copy-ready templates for SaaS and online stores, plus how to set them up as an AI agent.

 [Parvez Akther](https://www.thrivedesk.com/author/parvez/) 17 min read Updated November 19, 2026

![Line drawing of a script page with speech bubbles connected by arrows, the last one ticked](https://www.thrivedesk.com/_astro/chatbot-scripts.Dh5HwD81_ZwihoX.webp)

TL;DR

-   A chatbot script is the set of messages, questions, answers and rules a support bot follows. It covers the greeting, the question, the answer, the fallback and the handoff.
-   A button-tree script lists every path. An AI agent needs a different script: sources to answer from, guidance for voice and limits, procedures for multi-step jobs, actions for lookups and handoff rules.
-   To write one: pick jobs from your ticket data, write the happy path, add the branches, set the voice, write fallbacks and handoffs, test with real questions, then review chats every month.
-   This post gives 13 templates. Five suit SaaS (onboarding, login, failed payment, bug report, cancellation). Five suit online stores (order status, returns, sizing, shipping, back in stock). Three suit both.
-   Some lines stay word for word: the greeting, the privacy line, the handoff message, the out-of-scope reply and the error fallback. The AI can phrase the rest.
-   In ThriveDesk, you turn a script into an AI agent with Train sources, Guidance, Procedures, Actions and Handoff & Escalation. Then you test it in Preview & Simulations.

A chatbot script is a chat between two people, written down before it happens. If you would not say a line to a customer's face, do not give it to the bot.  Parvez Akther ThriveDesk

A bot with no route to a person leaves a stuck customer with no next step. Good chatbot scripts are short and honest, with a way to a person. This guide is for small SaaS and ecommerce teams. It teaches you how to write chatbot scripts from your own ticket data, then gives you 13 chatbot script templates to copy. For finished bots and more chatbot script examples, see [AI chatbot examples](https://www.thrivedesk.com/blog/ai-chatbot-examples/). This post is about the writing.

## What is a chatbot script?

A chatbot script is the set of messages, questions, answers and rules a support bot follows. It is a flowchart with words. It is also a voice guide that says how the bot sounds. This post covers chat for customer support, not Twitch bots or game bots.

Two kinds of script exist. A scripted bot offers buttons and keywords. You write every path, and the customer picks one. An AI agent reads free text and answers from your content, such as your [help center](https://www.thrivedesk.com/features/help-center/). You write the content and the rules, and the agent writes the reply.

Most teams use both. Fixed lines cover the moments that must not change, such as the greeting and the handoff. The AI covers the rest.

### Scripted bot vs AI agent script

|  | Scripted bot | AI agent |
| --- | --- | --- |
| What you write | Every message and every path | Sources, rules and a few fixed lines |
| Off-script question | Fails or repeats the menu | Answers from sources, or hands off |
| Upkeep | Edit each path when anything changes | Fix the source once |

## The parts of a chatbot script

Every script, scripted or AI, has the same eight parts. Each part has one job. A SaaS line and a store line show how each one reads.

| Part | Job | Example line |
| --- | --- | --- |
| Greeting | Say who the bot is and what it can do | “I’m the \[product\] bot. I can help with login and billing.” |
| Intent capture | Find out what the customer wants | “What can I help with? Order status, returns or sizing?” |
| Answers | Give the fix in as few words as possible | “Use the reset link on the login page.” |
| Clarifying question | Ask one thing when the request is vague | “Which plan are you on?” |
| Data collection | Ask only for what the next step needs | “What is your order number?” |
| Handoff | Pass the chat to a person with context | “I’m passing this to a teammate. They will see this chat.” |
| Fallback | Admit the bot is stuck and offer a way out | “I’m not sure. Want to rephrase, or talk to a person?” |
| Closing | Confirm the result and leave the door open | “Did that fix it? I’m here if not.” |

A few rules sit outside the table. The bot never claims to be human, because a customer who finds out stops trusting the next answer. Keep menus to four or five choices. Never ask for a password or a card number, and add a privacy line wherever you collect an email or an order number. In the handoff, say who answers and when, so the customer does not have to ask again. Name one owner for the whole script, because someone must change it when the business changes.

![Hand-drawn staircase of eight steps with a dot on the top step](https://www.thrivedesk.com/_astro/eight-script-parts.Dkz1bj88_zKOhD.webp)

## How to write chatbot scripts, step by step

This method works for a scripted bot and for an AI agent. It starts from data, not from a blank page. Good chatbot writing is short, plain and one question at a time.

### Step 1: Pick the jobs from your ticket data

Export or tag the last 100 to 200 chats or tickets. Count them by topic. Take the top five to eight. Do not start with “everything”. A bot that does five jobs well beats one that does thirty badly. If you have no clean tags, run a quick [customer support audit](https://www.thrivedesk.com/customer-service-audit/) first.

Typical SaaS tags are login, billing, bug, onboarding and cancel. Typical store tags are order status, returns, sizing, shipping and stock. Write the list at the top of your script document, with the monthly count next to each job.

### Step 2: Write the happy path

For each job, write the shortest route to a solved problem. Write it as a chat between two people, and keep each bubble to about 12 words. Ask one question per message, so the chatbot workflow stays easy to follow.

Do not write branches yet. Ask: what is the customer’s goal, and what is the fewest messages that get them there? For order status, the happy path is three messages: ask for the order number, give the status, offer help.

### Step 3: Write the branches

Add the two or three branches that cover most chats. Skip the rest and let the fallback catch them. Each branch must end in an answer or a handoff. Write each branch as a plain rule:

-   If the order is delayed, give the new date and offer a person.
-   If the customer says the parcel is lost, hand off with the order number.
-   If the login problem involves single sign-on, hand off to a teammate.

Keep the depth to three questions. A fourth question is a sign the job needs a person, not a longer script.

### Step 4: Set the voice

Pick three traits, such as plain, warm and direct. Pick three words you never use, such as “unfortunately”, “kindly” and “per our policy”. Use the same voice in every message. The greeting says it is a bot.

Stiff: “Unfortunately, we are unable to process your request at this time.”

Plain: “I can’t do that one. A teammate can. Want me to pass this on?”

### Step 5: Write fallbacks and handoffs

Write four replies before anything else: the “I don’t know” reply, the out-of-scope reply, the error reply and the handoff message. The out-of-scope reply covers questions the bot should not answer. The error reply covers a failed lookup. With the greeting and the privacy line, these replies make the five locked lines in the template section.

Always show a way to a person. Many customers distrust AI in support, as the Gartner data in the AI section below shows. A fallback that loops the same menu is worse than no bot.

### Step 6: Test with real questions

Take 20 real customer messages from your export. Include typos, short fragments and angry ones. Run all 20 through the script. Mark each one pass or fix. Test on a phone too, because many customers type there.

Add three tests of your own: a message in all capitals, a message with two questions, and a message that asks for a person. Fix every fail before launch.

### Step 7: Review chats every month

Read 30 chats each month. Look for three things: how often the fallback fires, why chats go to a person, and chats that reopen within a day. Add a line or a source for every gap.

Name one owner for the script. Put the review on their calendar. A script with no owner goes stale. The best chatbot scripts are the ones someone reviews each month.

![Hand-drawn open notebook with tally marks on the left page and a speech bubble on the right page](https://www.thrivedesk.com/_astro/ticket-data-notebook.Dk_vcie8_ZlyDPc.webp)

## Chatbot script templates for SaaS and online stores

Use each chatbot script template as a customer service chatbot script for your own help desk. Every template has a sample chat and a short list of reusable lines with \[placeholders\]. Fill in the brackets and test the lines with your own customers’ wording. The chats are written samples, not logs. Names and products are made up.

### SaaS templates

Software teams get the same few chats all day: login, billing, how-to, bugs and cancellations. These five cover most of them. For more on the last one, see [churn prevention tools](https://www.thrivedesk.com/best-churn-prevention-software/).

Login and failed payment are the two account chats. The login script never asks for a password. The payment script says whether access continues and sends refunds to a person.

Login

Support chat

Today 8:12 AM

Customer: The reset email never came and I'm locked out.

Mia: I can help. I will never ask for your password.

Mia: Check spam, then request a new link on the login page.

Customer: I use single sign-on at work.

Mia: Your admin manages that. I'm passing this chat to a teammate.

Failed payment

Support chat

Today 4:30 PM

Customer: Got an email saying my payment failed.

Leo: Your plan stays active until \[date\]. The card was declined.

Leo: Update it under Billing. We retry in \[retry window\].

Customer: Can I get last month back?

Leo: A teammate confirms refunds. I've sent them this chat.

Reusable lines for login:

-   “Use the reset link here: \[reset page\]. It expires in \[time\].”
-   “I will never ask for your password.”
-   “Your admin manages sign-in for \[company account\]. I’m passing this to a teammate.”
-   “Our team replies \[support hours\]. You will get an email at the address on your account.”

Reusable lines for failed payment:

-   “Your \[plan name\] plan stays active until \[date\].”
-   “Update the card here: \[billing page\]. We retry in \[retry window\].”
-   “A teammate confirms refunds. I’ve sent them this chat.”

Onboarding and bug report are the two chats for new and stuck users. The onboarding script gives three steps and one guide link. The bug script collects facts a developer can use and never promises a fix date.

Onboarding

Support chat

Today 10:05 AM

Customer: Just signed up. Where do I start?

Noor: Welcome! Start with \[first task\]. It takes about \[time\].

Noor: Then invite a teammate, then connect your tools.

Customer: Is there a guide?

Noor: Yes: \[guide link\]. Ask me if a step is unclear.

Bug report

Support chat

Today 1:48 PM

Customer: The export button does nothing.

Sam: Sorry about that. Which browser are you using?

Customer: Firefox.

Sam: What did you click before it failed?

Customer: Export, then CSV.

Sam: What email is on your account?

Customer: kim@example.com

Sam: Thanks. I've sent this to our team. I can't give a fix date, but you will hear back at that email.

Reusable lines for onboarding:

-   “Welcome to \[product\]! Start with \[first task\]. It takes about \[time\].”
-   “Next, \[second task\]. Then \[third task\].”
-   “Here is the guide: \[guide link\].”

Reusable lines for bug reports:

-   “Which browser are you using?”
-   “What did you click before it failed?”
-   “What email is on your account?”
-   “I’ve sent this to our team. I can’t promise a fix date, but you will hear back at that email.”

A customer who wants to cancel often has a smaller problem: price, pause or a missing feature. The cancellation script asks why, offers only options you really have, and hands the rest to a person.

Cancellation

Support chat

Today 6:20 PM

Customer: I want to cancel my subscription.

Ana: I can point you there. May I ask why?

Customer: We barely use it now.

Ana: You can pause for \[pause length\] or move to \[cheaper plan\]. Want either?

Customer: No, just cancel.

Ana: Understood. Cancel here: \[cancel page\]. A teammate will confirm by email.

Reusable lines for cancellation:

-   “I can point you there. May I ask why?”
-   “You can \[options\]. Want either?”
-   “Cancel here: \[cancel page\]. A teammate will confirm by email.”

### Online store templates

Store teams get the same few chats all day too: where is my order, can I return it, will it fit, when does it arrive, is it back. These five cover most of them. For the wider picture, see [ecommerce support best practices](https://www.thrivedesk.com/ecommerce-customer-service-best-practices/).

Order status is the biggest store chat. Returns come next. The order script asks for the order number and email and hands off a lost parcel. The returns script states the window and offers an exchange before a refund.

Order status

Shop chat

Today 11:20 AM

Customer: Where is my parcel? Ordered Monday.

Eli: Happy to check. What is your order number and email?

Customer: #48213, jo@example.com

Eli: It shipped with \[carrier\] and is out for delivery today.

Eli: Track it here: \[tracking link\].

Returns

Shop chat

Today 2:15 PM

Customer: These boots are too small. Can I send them back?

Zoe: Yes. Returns are open for \[return window\].

Zoe: Want a different size, or a refund?

Customer: A bigger size.

Zoe: Start the exchange here: \[return portal link\].

Reusable lines for order status:

-   “What is your order number and email?”
-   “It shipped with \[carrier\]. Track it here: \[tracking link\].”
-   “That parcel looks lost. I’m passing your order number to a teammate.”

Reusable lines for returns:

-   “Returns are open for \[return window\] after delivery.”
-   “Do you want an exchange or a refund?”
-   “Start here: \[return portal link\]. A teammate confirms the refund once the parcel arrives.”

Sizing and shipping are the two pre-purchase questions. The sizing script answers from your size guide and says that fit differs by brand. The shipping script asks for the country or postcode, then gives cost and window from your shipping page.

Sizing

Shop chat

Today 12:40 PM

Customer: Does this jacket run small?

Ivy: It fits \[fit note\]. What is your height and usual size?

Customer: 5'6, usually a medium.

Ivy: I'd pick medium. Fit differs by brand, so check \[size guide\].

Shipping

Shop chat

Today 7:55 PM

Customer: How much is delivery to Canada?

Kai: I can check. What is your postcode?

Customer: M5V 2T6

Kai: Delivery is \[cost\] and takes \[delivery window\].

Kai: Orders over \[threshold\] ship free.

Reusable lines for sizing:

-   “\[Product\] fits \[fit note\]. What is your height and usual size?”
-   “I’d pick \[size\] for \[product\]. Fit differs by brand, so check \[size guide\].”
-   “Not sure? A teammate can advise. Want me to ask?”

Reusable lines for shipping:

-   “What is your country or postcode?”
-   “Delivery to \[country\] is \[cost\] and takes \[delivery window\].”
-   “Orders over \[threshold\] ship free.”

Be careful with stock questions. A bot should not claim live stock numbers unless a lookup is connected and tested. Without one, the script says what it can see, offers an email follow-up and hands off.

Back in stock

Shop chat

Today 3:05 PM

Customer: The grey sneaker in size 9 is sold out. Will it return?

Rae: I can't see restock dates from here. Sorry.

Rae: I can ask a teammate to email you. What email should we use?

Customer: kim@example.com

Rae: Thanks. I've passed it on. They will follow up about the sneaker.

Reusable lines for back in stock:

-   “I can’t see restock dates from here. Sorry.”
-   “I can ask a teammate to email you about \[product\]. What email should we use?”
-   “Thanks. I’ve passed it on. They will follow up.”

### Templates for both

These three fit any team. Treat them as the base of every script you write.

After-hours capture and handoff are the two moments when a customer needs a person. The after-hours script says when the team is back and collects a name, an email and the question. The handoff message says what happens next, who will answer and how long it takes.

After hours

Support chat

Today 11:48 PM

Customer: Do you offer annual billing?

Max: Our team is offline. We're back at \[hours\].

Max: Leave your name and email, and I'll pass on your question.

Customer: Dee, dee@example.com

Max: Thanks, Dee. Expect a reply by \[reply time\].

Handoff

Support chat

Today 9:30 AM

Customer: This is the third time I'm asking. I want a person.

Lia: Sorry about that. I'm bringing in a teammate now.

Lia: They will see this whole chat, so you won't repeat it.

Lia: Expect a reply within \[reply time\].

Reusable lines for after-hours capture:

-   “Our team is offline. We’re back at \[hours\].”
-   “Leave your name and email, and I’ll pass on your question.”
-   “Expect a reply by \[reply time\].”

Reusable lines for handoff:

-   “I’m bringing in a teammate now. They will see this whole chat.”
-   “Expect a reply within \[reply time\].”
-   “You can also email \[support email\].”

The “I don’t know” fallback admits the gap and gives two choices. It never guesses.

Fallback

Support chat

Today 5:10 PM

Customer: Can you ship my order to a locker in Spain?

Joe: I'm not sure about that one.

Joe: Want to rephrase, or talk to a person?

Customer: A person.

Joe: Sure. I'm passing this chat to a teammate.

Reusable lines for the fallback:

-   “I’m not sure about that one.”
-   “Want to rephrase, or talk to a person?”

Keep these five locked lines in every script. Write them once and reuse them word for word.

| Locked line | Template |
| --- | --- |
| Greeting | “Hi, I’m the \[brand\] bot. I can help with \[two jobs\]. You can ask for a person any time.” |
| Privacy line | “I’ll use your email only to answer this request.” |
| Out of scope | “I can’t help with that here. A teammate can. Want me to ask?” |
| Error | “I couldn’t check that just now. A teammate will follow up at \[email\].” |
| Handoff | “I’m bringing in a teammate now. They will see this whole chat.” |

Your human team can use the same locked lines as saved replies. The [canned reply guide](https://www.thrivedesk.com/canned-reply-guide/) shows how to write them.

![Hand-drawn pair of speech bubbles, one with a check mark and one with a cross](https://www.thrivedesk.com/_astro/do-and-dont-bubbles.CMt517VA_387ca.webp)

## Chatbot script mistakes to avoid

Avoid these seven mistakes. Fix each one with one short line.

| Mistake | Fix |
| --- | --- |
| A wall of text in one bubble | Split it. One idea, about 12 words, per message. |
| No way to a person | Show it in the first message and in every fallback. |
| A menu with 12 buttons | Cut to four or five. Let free text cover the rest. |
| A bot that pretends to be human | Say it is a bot in the greeting. |
| Guessing a refund date or stock level | Say a teammate confirms. Never invent a date or a number. |
| Asking for a password or card number | Never ask. Send a secure reset or billing link instead. |
| Never updating after launch | Review 30 chats each month and name an owner. |

## Chatbot scripts in the AI agent era

A button-tree script lists every path in advance. When a customer types something outside the tree, the bot fails. An AI agent does not follow a tree, so the script you write changes shape.

For an AI agent, you write the inputs. It answers from the knowledge you give it, such as your help center, short Q&A answers, your website and files. Guidance sets the tone and the limits. Procedures cover multi-step jobs such as returns. Actions do lookups such as orders. Handoff rules say when a person must step in.

| Old script part | AI agent equivalent |
| --- | --- |
| Greeting | Guidance, plus one fixed line |
| Answer tree | Sources: help center, Q&A, website, files |
| Branches | Procedures |
| Data collection | Actions that look up the data |
| Fallback | Handoff rule and out-of-scope reply |

Some lines still stay word for word, because a wrong phrase here costs trust or breaks a rule. These are the greeting with the “I’m a bot” line, the consent and privacy line, the handoff message, the out-of-scope reply and the error fallback. The AI can phrase everything else from your sources. It words the answers, the order details and the follow-up questions in its own way. It does this inside the limits you set in guidance.

The fixed lines stay fixed for a reason. A greeting that hides the bot, a privacy line with new wording or a handoff that promises too much can cause a complaint. You can check a fixed line once. You cannot check every phrase an AI writes. ThriveDesk has built support software since 2021, and the AI agent follows the same rule: fixed lines for risk, sources for everything else.

![Hand-drawn branching tree of dots with an arrow pointing to a stack of four blocks](https://www.thrivedesk.com/_astro/branching-to-blocks.BXJmHW-q_1SDimy.webp)

Many customers are wary of AI in support. Gartner surveyed 5,728 customers in December 2023 and published the result in July 2024.

64%

of customers would prefer that companies did not use AI in customer service

Gartner press release, 9 July 2024 (survey of 5,728 customers, December 2023)

53%

would consider switching to a competitor if they found out a company would use AI for customer service

Gartner press release, 9 July 2024 (same survey)

80%

of common service issues predicted to be resolved by agentic AI without a person by 2029 (prediction)

Gartner press release, 5 March 2025

So the way to a person is the most important line you write. Show it in the greeting and in every fallback. The work moves from writing paths to writing content and rules.

## How to choose a chatbot product

Check four things before you pay for any chatbot product:

1.  It answers only from your sources, and you can limit it.
2.  It shows what it did: an activity log, the source it used, and a way to test before launch.
3.  It hands off cleanly. The full chat goes to the person, and you control the rule.
4.  The team is visible. Look for a dated changelog that goes back years, a named team and a public list of integrations.

Some tools are built fast with AI coding tools and shipped with little testing or security review. They look fine in a demo. Check these signs in 10 minutes:

-   No dated changelog or release history.
-   No list of live integrations you can open.
-   No named team or company address.
-   No security or data-handling page.
-   Pricing that hides limits, or “unlimited” claims with no handoff controls.
-   No way to test before going live.
-   No status page, and a support channel that does not answer.

ThriveDesk has run since 2021, which is more than five years. It has an established customer base and a dated changelog. Its [Shopify](https://www.thrivedesk.com/integrations/shopify/), [WooCommerce](https://www.thrivedesk.com/integrations/woocommerce/) and [Freemius](https://www.thrivedesk.com/integrations/freemius/) integrations are live, and a real engineering team builds it.

Plans start at $29 a month, and the AI agent and live chat come with every plan. See [pricing](https://www.thrivedesk.com/pricing/) for the full list. For a wider comparison, read the [best AI chatbots for customer support](https://www.thrivedesk.com/blog/best-ai-chatbots-for-customer-service/).

## How to turn a chatbot script into an AI agent in ThriveDesk

This tutorial turns your script into a working AI agent in ThriveDesk. You need an account and a few help articles. The AI agent is called Neo, and the app labels use that name. Each step ends with a test. For background, read [conversational customer service](https://www.thrivedesk.com/blog/conversational-customer-service/) and the page on [AI training](https://www.thrivedesk.com/ai/training/).

### Step 1: Map the script to the agent

Decide where each script part lives before you click anything.

| Script part | Where it lives in ThriveDesk |
| --- | --- |
| Answers | Train sources: Q&A, File, Website, Doc |
| Greeting, voice and limits | Guidance |
| Multi-step flows, such as returns | Procedures |
| Order and purchase lookups | Actions |
| Handoff and fallback | Handoff & Escalation |

### Step 2: Add the sources

1.  Open **Neo** in the left rail.
2.  Open **Doc**. Your help center docs are listed under **Sources**. Select **Create doc** if an article is missing.
3.  Open **Website**, then select **Add website**. Type your domain, such as “example.com”. Select your product, shipping and policy pages.
4.  Open **File**, then select **Upload Files**. Add a size guide or a policy file. The upload takes PDF, Word, Excel and text files, up to 10 files and 50 MB at a time.
5.  Open **Q&A**, then select **Add Q&A**. Type one answer from your script, such as the return window. Repeat for your top ten questions.

Test: open **Preview & Simulations** and type “How do I reset my password?”. The reply should name the right article. If it does not, add a Q&A answer for that question or rename the article title to match the customer’s words.

![The ThriveDesk Neo Q&A page with a return window question and its answer filled in, ready to add](https://www.thrivedesk.com/_astro/add-qna.C_C9_ETU_ZNJcQC.webp)

### Step 3: Write the guidance

Guidance holds the voice and the limits from step 4 and step 5 of the method.

1.  Open **Guidance**.
2.  In **Voice and tone**, select a **Tone**, such as **Friendly** or **Professional**.
3.  In **Answer length**, select **Concise** for chat.
4.  Select the **Brand summary** box. Type your voice traits, your never-use words and your limits, each on its own line. For example: “Never ask for a password or a card number.” “Never promise a refund date or a stock level.” “Say a teammate confirms refunds.”
5.  Select **Save**.

Test: type “When will I get my refund?” in **Preview & Simulations**. The reply should give no date. If it gives one, make the rule more direct. Read more about [guidance](https://www.thrivedesk.com/ai/guidance/).

![The ThriveDesk Guidance page with the Brand summary box, where you type the voice rules and limits](https://www.thrivedesk.com/_astro/guidance.CL902tNP_OsIcH.webp)

### Step 4: Turn a flow into a procedure

A procedure is a step-by-step instruction the agent follows for one kind of request. Use one for the return flow and one for bug reports.

1.  Open **Procedures** in the **Train** group. The page is titled **My Procedures**.
2.  Select **Add procedure**. The **Browse templates** tab lists ready-made ones, such as an order refund.
3.  Type a name in **Untitled procedure**, such as “Return an item”.
4.  In **When to use this procedure**, describe the request. For example: “The customer wants to return or exchange an order.”
5.  In **Instructions**, write the flow from your script in short steps: confirm the order, state the return window, offer an exchange first, share the return link, say a teammate confirms the refund.
6.  Select **Save draft** to keep working. Select **Publish** to make it live.

Test: type “I want to return my boots” in **Preview & Simulations**. The reply should follow your steps in order.

![The ThriveDesk procedure editor with a Return an item procedure: when to use it and five numbered steps, with Save draft and Publish buttons](https://www.thrivedesk.com/_astro/neo-procedure.0BCIn4n8_1Idr4G.webp)

### Step 5: Turn on actions for lookups

Lookups replace the data-collection part of your script.

1.  Open **App Store** in the left sidebar. Install Shopify or WooCommerce for orders. For purchases, install Stripe, Paddle or Freemius. WooCommerce also needs the ThriveDesk plugin.
2.  Open **Actions** in the **Train** group.
3.  Select **Add action**, then select the app you connected.
4.  Select the action that looks up an order or a purchase. Leave the others off until you trust the agent.

Test: type “Where is my order?”. The agent should ask for the order number and look it up. If it does not, check the app connection. See the [AI actions](https://www.thrivedesk.com/ai/tools/) page for more.

![The ThriveDesk Actions page listing order lookup, subscription and lead actions with a switch for each](https://www.thrivedesk.com/_astro/actions._3am3mn6_Z2gWdzs.webp)

### Step 6: Set handoff and fallback rules

1.  Open **Handoff & Escalation**.
2.  Type your locked handoff message in **Handoff message**.
3.  Turn on **When no one is online, ask for an email and open a ticket**. This is your after-hours capture.
4.  Select **Add rule**. Type a **Name**, such as “Refunds”.
5.  In **Trigger**, select **A message mentions keywords**. In **Keywords**, type “refund, chargeback, cancel subscription”.
6.  In **Assign to**, select a teammate, then **Save**.
7.  Select **Add rule** again. In **Trigger**, select **The customer asks for a person**. Assign a teammate and **Save**.

Test: send a message with the word “refund”. Check that the rule applies. Read more about [escalation](https://www.thrivedesk.com/ai/escalation/).

![The ThriveDesk Handoff & Escalation page with the handoff message, the after-hours switch and three handoff rules](https://www.thrivedesk.com/_astro/handoff.C7LsBQdS_SG84M.webp)

### Step 7: Test, then turn it on

1.  Open **Preview & Simulations**.
2.  Type 10 customer lines from the templates above. Include typos and one angry message.
3.  Select **Improve Answer** on a wrong reply. Fix the source or the rule behind it.
4.  Under **Deploy**, open **Chat widget**. If you have none, select the **+** next to **Chat widget**, type an **Assistant name** and choose your inbox in **Select Inbox**.
5.  Open your widget and select the **NEO** tab.
6.  Turn on **Enable NEO**.

After one week, open **Agent Activity** and read 30 chats, as in step 7 of the method. Add a source or a rule for each gap. Handoffs land in your shared inbox.

![The ThriveDesk Preview & Simulations page with the Live Chat tab, the instructions panel and the test chat ready for a message](https://www.thrivedesk.com/_astro/preview-simulations.CkgYWU8U_Z1xlDdo.webp)

## Frequently asked questions

### What is a chatbot script?

A chatbot script is the set of messages, questions, answers and rules a support bot follows in a chat. It holds the greeting, the way the bot finds out what the customer wants, the answers, a fallback and a handoff to a person. Think of it as a chatbot conversation flow written in plain words, plus a voice guide.

### How do you write a chatbot script?

Follow seven steps. Pick the top jobs from your ticket data. Write the shortest happy path for each. Add the two or three branches that matter. Set the voice. Write fallbacks and handoffs. Test with 20 real customer messages. Review 30 chats every month. Keep each message short, with one question at a time.

### What should a chatbot script include?

A customer support chatbot script needs eight parts: a greeting, intent capture, answers, clarifying questions, data collection, a handoff, a fallback and a closing line. Add a privacy line where you collect an email or order number, and name an owner who updates the script when a policy or product changes.

### Are there free chatbot scripts I can copy?

Yes. This post has 13 free chatbot scripts: five for SaaS, five for online stores and three for both. Each has a sample chat and reusable lines with \[placeholders\]. Replace the placeholders with your own policies and links, then test every line with real customer messages before you publish it.

### What is the difference between a chatbot script and an AI agent script?

A chatbot script lists every path in advance, usually as buttons and keywords. An AI agent script is a set of inputs: sources to answer from, guidance for tone and limits, procedures for multi-step jobs, actions for lookups such as orders, and handoff rules. A few lines, such as the greeting and the handoff message, stay word for word.

### How long should a chatbot message be?

Keep each message to one idea and about 12 words or fewer. Ask one question at a time. Long messages get skipped on a phone, and a bot that asks three things at once gets one answer. If an answer needs more words, send a short reply and a link to the full article.

### How often should I update a chatbot script?

Read about 30 chats every month and add a line or a source for each gap you find. Update the script at once when a policy, price, return window or product screen changes. Give the script one owner, so that a change in the business always reaches the bot.

![Parvez Akther](https://www.thrivedesk.com/_astro/parvez.D6nO2bZR_R4Rks.webp)

Written by

[Parvez Akther](https://www.thrivedesk.com/author/parvez/) ThriveDesk

Parvez is the co-founder and CEO of ThriveDesk, and cares about customer experience and support. Parvez is an open source enthusiast and a father of three.
