Browse sections

Scenarios and tools

Teach your Hadir AI assistant how to act in specific situations, set its limits and tone, and connect it to your own systems with custom tools.

On this page

Knowledge tells the assistant what to answer. Scenarios, guardrails and response guidelines tell it how to behave. Tools let it do something, such as hand a conversation over or look up an order's status in your system.

Everything on this page is for administrators, and available if your plan includes it.

Add a scenario

A scenario is a specific situation and how to handle it, such as "Refund request" or "Customer asks about a late order".

  1. Under Hadir AI, open Scenarios.
  2. For a quick start, pick one from Example scenarios and select Add this, then adjust it. Or select Add a scenario (1) to write your own.
  3. In Create a scenario, fill in:
    • Title (2): a short name, such as "Refund request".
    • Description: when this scenario applies.
    • How to handle (3): the steps the assistant follows. Type @ to pick a tool it uses in those steps.
  4. Select Create.

An example for How to handle: "Ask for the order number. If the order is more than 14 days old, apologise politely. Otherwise hand the conversation to the team with a private note giving the order number."

Built-in tools

When you type @, four built-in tools appear:

  • Handoff to Human: give the conversation to an agent.
  • Add Private Note: leave an internal note the customer does not see.
  • Add Label to Conversation: tag the conversation.
  • Set Priority: mark the conversation's priority.

Any custom tool you created is listed after them.

Guardrails and response guidelines

Open Settings under Hadir AI. You will find two tabs:

  • Guardrails (1): what the assistant never answers, such as "Do not give medical advice" or "Do not promise discounts". Type it under Add a guardrail and select Create, or add from Example guardrails.
  • Response guidelines (2): the tone and shape of replies, such as "Short replies, three sentences at most" or "Friendly Gulf Arabic". Add them with Add a response guideline.

Create a custom tool

A custom tool connects the assistant to one of your systems through an API address, so it can look things up during a conversation. For example: a customer asks about their order, the assistant calls your system with the order number and replies with the status.

  1. Under Hadir AI, open Tools and select Create a new tool.
  2. In Create Custom Tool, fill in the Tool Name (1) and the Description. Write the description clearly: the assistant relies on it to know when to use the tool.
  3. Choose the Method (GET or POST) and enter the Endpoint URL (2).
  4. Choose the Authentication Type: None, Bearer Token, Basic Auth or API Key, and fill in its details.
  5. Under Parameters, select Add Parameter for each piece of information the assistant takes from the customer, such as order_id, and set its type and whether it is Required. Use it in the URL or in the Request Body Template (Optional) as {{order_id}}.
  6. You can write a Response Template (Optional) to shape what the assistant takes from the answer.
  7. Select Test connection (3) if it is available, then Create.

Once the tool exists, mention it with @ in the How to handle text of the scenario that needs it.

Note: tools are shared by all the assistants in your workspace. Having more than 10 tools may reduce the assistant's reliability in picking the right one, so remove the ones you do not use. Try every new scenario in the Playground before you rely on it.

Was this helpful?

Thanks for your feedback ✓

Please don't include personal details

We got your note and will review the article with it in mind.

To see how this site uses cookies, read our Privacy Policy