# Instructions - Craft custom bot behaviors with ease 

'Instructions' in Bot9 is a powerful tool that allows you to define conditions
or guidelines that dictate how your bot should respond to user queries.



You could think of them as the 'If-Then' procedures for your bot - if a
condition is met, then perform a certain action.



Each instruction has 3 components: name (for your own reference), instruction
and an action (optional).


GUIDE TO CREATING INSTRUCTIONS

 1. Navigate to the 'Instructions' menu option on your Bot9 dashboard.

 2. Click on 'Create A New Instruction'. Now you are in the instructions builder
    interface.

 3. Name your instruction. Ensure that the name is relevant and descriptive, for
    better management later.

 4. Define the 'Trigger(s)'. Triggers are the events that activate the
    instruction.

 5. Next, set the 'Conditions'. Conditions are criteria that have to be met for
    the rule to take effect. They essentially refine the trigger. For example,
    if your trigger is a user's input, the condition could be that the input
    contains a keyword or phrase.

 6. Set the 'Action(s)'. These are the steps that the bot will perform when the
    rule is triggered and the conditions are satisfied. This can range from
    sending a specific message, updating user information, or changing
    conversation status.

 7. When you're finished setting up your rule, click 'Save'. The rule will now
    be active for all relevant chatbot interactions.
    
    Tip: You can also choose a suggested instruction template, and modify it
    according to your needs.


EXAMPLES OF INSTRUCTIONS

 1. Name: Update conversational status
    Description: If the user input contains the word "cancel", reply "Please
    wait while I transfer this chat to the relevant person".
    Action: Assign chat to human
    
    
    
    Whenever this rule gets triggered, the conversation status will get changed
    from bot to "Human" instantly.
    

 2. Name: Ask for email
    Description: You must ask for an email ID before assisting with any queries.
    If someone refuses to provide an email ID, reiterate and explain why it's
    important to share an email.
    Action: Update email
    
    
    
    The bot will ask for the email ID before providing assistance. Once a user
    shares their email ID in the chat, their customer details will be updated.

Please remember that the number of rules you can create depends on your
subscription plan.


HERE ARE A FEW MORE USEFUL INSTRUCTIONS:

 1. Account Troubleshooting: If a question contains the phrases "login issue" or
    "can't sign in," direct the user to an article about resolving login issues.

 2. Feature Requests: If a user asks, "Can your platform do X?",ask them to send
    a detailed email about the feature request on suggest@yourcompany.com

 3. Platform Integration Queries: When a question involves "integration" or
    mentions specific software like Slack, Zapier, etc., direct them to the
    respective integration guide.

 4. Compliance and Security: If someone asks about "GDPR" or "data security,"
    guide them to the official documentation covering your platform's compliance
    measures.

 5. Trial and Demo: If the word "trial" or "demo" is mentioned, offer to set
    them up with a free trial or a demo session.

 6. Upsell Opportunities: If a user asks about features not available in their
    current plan, provide information about upgrading and link to the pricing
    page.

 7. Sentiment Analysis: If negative sentiment is detected (e.g., "unhappy,"
    "frustrated," "cancel"), aplologize the user and share a coupon code TEST100
    which will give them 10% discount.


DOS AND DON'TS OF THE INSTRUCTIONS:

✅ Do's

❌ Don'ts

Be Specific: Make sure the rules are not too broad to avoid false positives.

Avoid Ambiguity: Don't set rules that are too similar or could confuse the bot.

Test Extensively: Always test new rules to ensure they work as expected.

Don't Overcomplicate Conditions: Keep conditions straightforward to ensure they
are easy to debug.

Keep it Simple: Don’t make overly complicated rules that are hard to
troubleshoot.

Don't Neglect Fallbacks: Always have a 'default action' for unrecognized
queries.

Review and Update: Periodically review the performance of your rules and make
necessary adjustments.

Don’t Set and Forget: Rules might need to be adjusted over time, based on user
behavior or business needs.

FAQs:



Q: How many instructions can I create?

A: The number of instructions you can create depends on which plan you're on.
The Starter Plan allows you to create up to 5 custom instructions, the Pro plan
allows you to create up to 10 custom instructions, and the Unlimited and
Enterprises plan allows for the creation of unlimited instructions.



Q: Why isn't a instructions I created working?

A: Ensure that the conditions you've defined for the rule are accurate and not
too restrictive. The specificity of conditions and the OpenAI model you're using
largely governs the functionality of any rule.

By default your chatbot will be using OpenAI 3.5 model, but you can use other
OpenAI models such as GPT4 for better answers by adding your OpenAI key
[https://app.bot9.ai/api-key] here.



Q: Can I modify a instruction once created?

A: Absolutely! Instructions in Bot9 are not set in stone and can be tweaked
according to evolving needs.