Creator Scripts.
Smart Software For Maverick Entrepreneurs

By: CreatorScripts | April 27, 2021

Z-3PO is a BOT programmed for guidance built by the heroic team of Creator Scripts using Zoho Sales IQ. The BOT handles live conversations on our website even when we are not online. It learns from our knowledge library and guides the end-user to the tools and information they need.

Affiliations: Zoho

Location: Saltillo, Coahuila Mexico

Creator: Creator Scripts

Below you can find the entire script we used to built Z-3PO. Feel free to use the script below or reach out if you need help building your own custom CHAT BOT.

Message Handler

response = Map();
msg = message.get("text");
if(operation.equals("chat"))
{
if(!msg.equalsIgnoreCase("I'm new here, just browsing") && !msg.equalsIgnoreCase("I'm an existing customer and need help") && !msg.equalsIgnoreCase("I want a product demo"))
{
response = Map();
response.put("action","reply");
response.put("replies",{"Hello there! 👋 Looking to Leverage Zoho and take your platform to the next level?"});
response.put("suggestions",{"I'm new here, just browsing","I'm an existing customer and need help","I want a product demo"});
return response;
}
}
if(msg.equalsIgnoreCase("I'm new here, just browsing"))
{
response.put("action","context");
response.put("context_id","browsing");
question = {"name":"browsing","replies":{"Awesome. Let’s get you started with Deluge Scripting. Here’s our on demand [YouTube Videos](https://www.creatorscripts.com/youtube-tutorials.html) that you can watch at your own pace."},"suggestions":{"Thanks"}};
response.put("questions",{question});
}
else if(msg.equalsIgnoreCase("I'm an existing customer and need help"))
{
response.put("action","context");
response.put("context_id","help");
question = {"name":"help","replies":{"Welcome back Maverick Entrepreneur! Did you know that you can now add and track your own support tickets in our portal? [Support Portal](https://support.creatorscripts.com/portal/en/home)."},"suggestions":{"Need custom development","Online Courses","Can't find what I'm looking for"}};
response.put("questions",{question});
}
else if(msg.equalsIgnoreCase("I want a product demo"))
{
response.put("action","context");
response.put("context_id","demo");
question = {"name":"time","replies":{"Great! Let’s set up a personalized demo to help you manage social media for all your clients. When would you like to schedule it?"},"input":{"type":"calendar"}};
response.put("questions",{question});
}
else
{
response = Map();
response.put("action","reply");
response.put("replies",{"Is there anything else I can help you with?"});
response.put("suggestions",{"I'm new here, just browsing","I'm an existing customer and need help","I want a product demo"});
return response;
}
return response;

Trigger Handler

response = Map();
response.put("action","reply");
response.put("replies",{"Hello there! 👋 Looking for anything specific?"});
response.put("suggestions",{"I'm new here, just browsing","I'm an existing customer and need help","I want a product demo"});
return response;

Context Handler

response = Map();
response.put("action","context");
response.put("context_id",context_id);
if(context_id.equals("browsing"))
{
browsing = answers.get("browsing").get("text");
if(browsing.equalsIgnoreCase("Thanks"))
{
response.put("action","end");
response.put("replies",{"Have a great day"});
}
else
{
response.put("action","reply");
response.put("replies",{"What else can I help you with?"});
response.put("suggestions",{"I'm new here, just browsing","I'm an existing customer and need help","I want a product demo"});
}
}
else if(context_id.equals("help"))
{
help = answers.get("help").get("text");
if(help.equalsIgnoreCase("Need custom development"))
{
if(!answers.containsKey("elsepart"))
{
question = {"name":"elsepart","replies":{"Sure! Please elaborate on the details of the requirement in the following form [Custom Development](https://www.creatorscripts.com/submit-a-request.html) .","Is there any thing else that I can assist you with?"},"input":{"type":"select","options":{"Yes, I need help","No, Thank you"}}};
response.put("questions",{question});
}
else
{
elsepart = answers.get("elsepart").get("text");
if(elsepart.equalsIgnoreCase("Yes, I need help"))
{
if(!answers.containsKey("email"))
{
question = {"name":"email","replies":{{"text":"Can I have your email address so that we can reach you in case the chat gets disconnected","field_name":"siq_email","validate":{"format":"email","error":{"Enter a valid email"}}}}};
response.put("questions",{question});
}
else
{
email = answers.get("email").get("text");
if(!answers.containsKey("name"))
{
question = {"name":"name","replies":{{"text":"Can I have your name please?","field_name":"siq_name"}}};
response.put("questions",{question});
}
else
{
name = answers.get("name").get("text");
if(!answers.containsKey("phone"))
{
question = {"name":"phone","replies":{{"text":"Can I have your phone number in case we need to reach out to you for further follow up","validate":{"format":"phoneno","error":{"Enter a valid phone number"}},"field_name":"siq_phone"}}};
response.put("questions",{question});
}
else
{
phone = answers.get("phone").get("text");
response.put("action","forward");
response.put("replies",{"Please wait while I forward the chat to agents"});
}
}
}
}
else if(elsepart.equalsIgnoreCase("No, Thank you"))
{
if(!answers.containsKey("anythingelse"))
{
question = {"name":"anythingelse","replies":{"Is there any thing else that I can assist you with?"},"input":{"type":"select","options":{"Yes","No"}}};
response.put("questions",{question});
}
else
{
anythingelse = answers.get("anythingelse").get("text");
if(anythingelse.equalsIgnoreCase("Yes"))
{
response.put("action","reply");
response.put("replies",{"Hello there! 👋 Looking for anything specific?"});
response.put("suggestions",{"I'm new here, just browsing","I'm an existing customer and need help","I want a product demo"});
}
else
{
response.put("action","end");
response.put("replies",{"Bye"});
}
}
}
}
}
else if(help.equalsIgnoreCase("Sales Enquiry"))
{
if(!answers.containsKey("email"))
{
question = {"name":"email","replies":{{"text":"Can I have your email address so that we can reach you in case the chat gets disconnected","field_name":"siq_email","validate":{"format":"email","error":{"Enter a valid email"}}}}};
response.put("questions",{question});
}
else
{
email = answers.get("email").get("text");
if(!answers.containsKey("name"))
{
question = {"name":"name","replies":{{"text":"Can I have your name please?","field_name":"siq_name"}}};
response.put("questions",{question});
}
else
{
name = answers.get("name").get("text");
if(!answers.containsKey("phone"))
{
question = {"name":"phone","replies":{{"text":"Can I have your phone number in case we need to reach out to you for further follow up","validate":{"format":"phoneno","error":{"Enter a valid phone number"}},"field_name":"siq_phone"}}};
response.put("questions",{question});
}
else
{
phone = answers.get("phone").get("text");
response.put("action","forward");
response.put("replies",{"Please wait while I forward the chat to agents"});
}
}
}
}
else if(help.equalsIgnoreCase("Can't find what I'm looking for"))
{
if(!answers.containsKey("email"))
{
question = {"name":"email","replies":{"Uh-oh! Sorry about that.",{"text":"Do you have an email address where we can reach you?","validate":{"format":"email","error":{"Please enter a valid email"}},"field_name":"siq_email"}}};
response.put("questions",{question});
}
else
{
email = answers.get("email").get("text");
if(!answers.containsKey("name"))
{
question = {"name":"name","replies":{{"text":"What's your name?","field_name":"siq_name"}}};
response.put("questions",{question});
}
else
{
// handle failure
name = answers.get("name").get("text");
response.put("action","forward");
response.put("replies",{"Please wait while I transfer your chat to the agents"});
}
}
}
else
{
question = {"name":"help","replies":{"Absolutely! Our most popular courses are right here. [Online Courses](https://www.creatorscripts.com/online-courses.html)"},"suggestions":{"Need custom development","Sales Enquiry","Can't find what I'm looking for"}};
response.put("questions",{question});
}
}
else if(context_id.equals("demo"))
{
time = answers.get("time").get("text");
if(!answers.containsKey("email"))
{
question = {"name":"email","replies":{{"text":"Do you have an email address where we can reach you?","field_name":"siq_email","validate":{"format":"email","error":{"Enter a valid email"}}}}};
response.put("questions",{question});
}
else
{
email = answers.get("email").get("text");
response.put("action","end");
response.put("replies",{"Thanks! One of our developers will reach out to you soon."});
}
}
return response;

Category: Zoho Sales IQ 

Tags: AI, Website, Chat BOT, BOTS 

Comments:

Be the first to comment ...

Post a Comment

Tags

Entrepreneur

HTML

PDF

Word

API

Geolocation

IP Address

Rapleaf API

Email

Pages

Deluge Scripts

Google API

Custom Functions

Gapps

Developer

Webmerge

Creator Scripts

Online Database

Online Tools

Email Marketing

Key Benefits

Sales and Marketing

SaaS

LTV

Barcodes

Hacks

Ted Talks

Quickbase

Spreadsheets

Integrations

Apps

Remote Support

How To Videos

Business Intelligence

Security

Mobile

Zapier

Presentations

Mileage Tracking

LastPass

LogMeIn

Google Analytics

Google Chrome

Expense Receipts

Pivot Table

Reminders

Printing

MS Access

Zoho Creator

GrowthHacking

Productivity

Macros

zohodevs

QR Code

Inventory

Send Email

Fetch Records

digitalnomad

startuplife

hustle

Loyalty

NPS Survey

onlinemarketing

socialmediamarketing

contentmarketing

ladyboss

Gamescope

twitter

HR

Monster

Dice

Zip Recruiter

Zoho Invoice

Wepay

Cashflow

startup

GameofThrones

BI

bigdata

peterdiamandis

online survey

olympic games

Email Receipts

success

Email reminders

business email

zoho mail

Scheduled Emailing

Applicant Tracking

AT

online quizes

online quizzes

Ladyboss

Subforms

G Suite

Invoicing

Image Management

Iterations

Pricing

Price Books

ImagesAPI

GettyImages

iStock

Thinkstock

Ash Maurya

Nick Smith

Jonathan Taylor

Dashboards

randomness

Colombia

Hosting Email

zohomail

Phone Format

Gmail

ZohoCRM

viralloop

ifttt

northstar

metric

fax com

optimization

reducecosts

Cloud Software

Zoho One

Spectre

Meltdown

chatbots

Adwords

Tradeshow

Live chat

Zia

AI

Phone Validation

Zoho CRM

Data Backup

Dropbox

SEO

Shopify

Facebook

Checkr

Human Resources

People

Recruiters

Website

CSS

HubSpot

ZohoAnalytics

Zoho Social

digitaltransformation

Recruiting software

Streamline hiring

Zoho

Zoho recruit

Zoho Books

accounting software

gst filing

Automation

Customer Engagement

custumer journeys

Digital marketing

collaboration

Online Meeting

Zoho Marketplace

applicant tracking system

hiring

HRMS

recruitment

zoho recruit

CRM Award

CRM Software

PCMag Business Choice Award 2019

candidate onboarding

Employee Onboarding Software

Email deliverability

email marketing automation

SaaS Metrics

Stripe Analytics

Subscription Analytics

Zoho Analytics

sales analytics

data

Cliq mobile

ipad

iPad app

best practices

effective strategies

Expert Diaries

smart email marketing

jobboards

recruiting

3D Touch

iOS

RDP

remote access

remote desktop

screen share

Siri

Siri Shortcuts

widgets

Zoho Assist

overtime

Payroll

Time tracking

timesheets

positive work culture

positivity

productivity

team communication

work culture

zoho analytics

operation

aimatching

recruit

Customer Delight

email content

Process Automation

Workflow Automation

workplace productivity

employee engagement

employee retention

leadership

retention strategies

zoho

one

business

services

iovox

telephony

Zoho CRM Integrations

ringcentral

send Fax

Faxes

googleforjobs

googlejobs

joblisting

postjobs

Free migration ATS

Google Hire

mobileapp

industries

route planner

zoho CRM

Email marketing myth

Email spam

Myth debunking

android

Cybersecurity

mobile app

Password Manager

analyzing

customer

CRM

Customer

Favorite

management

Relationship

Sales

holiday email marketing

customer trust

Effective Emails

small business

Small Business Saturday

email marketing resources

Small business email marketing

Biotechnology

Healthcare

medical devices

pharmaceuticals

analytics

public dashboard

Slack

candidate experience

sourcing

video interviews

website

sections

planning

many to many relationship

windows 10

windows accounting app

Windows Hello

Customer Support

email

email hosting

eWidget

free email hosting

Email Campaigns

Email marketing plans

remote working

Covid19

crisis management

Invoicera

TowerData

Email Intelligence

increase productivity team collaboration software team communication software

information

information ecosystem

Zoho people

zia

Event management

social distancing tools

email scheduling

email send time

open rates

Facial recognition

HR Software

HR Tech

LMS

New Features Alert

What s New

Zoho People

education

Education tools

online education software

Chat BOT

BOTS

CLM

Contract lifecycle management

contract management

digital transformation

e-commerce

MSME

SMBs