AskMavis
HelpChangelogRoadmapFeedback
  • Getting started
  • Your AI agent
  • Actions and procedures
    • What actions do
    • Custom actions
    • Collect leads and data
    • Talk to a person
    • Procedures
    • Start a custom action from a template
    • Send to a webhook
    • Lookup table
    • Email the team
  • Install your agent
  • Helpdesk
  • Contacts
  • Help center and boards
  • Workspace and account
  • FAQ
Actions and procedures

Custom actions

Connect your agent to your own API so it can look up orders, bookings and accounts.

AT
Written by AskMavis Team
Published 41m ago

A Custom Action lets your AI agent call your own API during a chat, for example to look up an order status or a booking. Custom actions are on paid plans.

Before you start

You need an API endpoint that accepts an HTTPS request and returns JSON.

Set up a custom action

  1. Open your agent, go to Actions and add a Custom Action.
  2. Give it a Name and describe When to use it.
  3. Under Inputs the AI collects, add what the agent should ask the visitor for, like an order number. Give each a name, type and what to ask for.
  4. Set the Method and URL. Use inputs in the URL, Query parameters, Headers or JSON body, like {order_number}.
  5. Store API keys as a Secret. Secrets are stored encrypted and never shown to the AI.
  6. Choose What the AI can see: Only the fields I pick (recommended) or The full response.
  7. Click Send test request to check it works and to list the fields you can pick.
  8. Save, then publish your agent.

Who can run it

Who can run this decides who the action runs for:

  • Anyone: any visitor can trigger it.
  • Signed-in visitors only: only visitors your website has signed in with identity verification. Anonymous visitors are offered a handoff to your team instead.

If an input is typed by the visitor, like an email or order number, someone could guess another person's value and read their record. For anything private, choose Signed-in visitors only, or make sure the API returns nothing private.

Contact values, like the signed-in visitor's email, only come from verified visitors. An action that uses them can only run for signed-in visitors. See Sign in your visitors.

Check a detail

Check a detail stops anyone reading another person's record by guessing a number. Choose an input the visitor gives, like email, and the field in your API's answer that must hold the same value, like billing.email. The AI agent only sees the answer when the two match, ignoring capital letters and spaces. When they don't, it answers exactly as if there were no record.

Example response

Add an Example response to use while your API isn't ready. Tests also use it.

Related

  • What actions do
  • Procedures

Was this article helpful?

Contact support

Related articles

  • What actions doLet your AI agent do more than answer, from showing a button to calling your own API.
  • Collect leads and dataHave your agent ask for contact details or the information a request needs, right in the chat.
  • Talk to a personChoose when visitors can reach your team, and what happens if nobody is free.
  • ProceduresGive your agent step-by-step scripts for refunds, cancellations and other requests that need a set process.
← Back to Help Center

On this page

  • Before you start
  • Set up a custom action
  • Who can run it
  • Check a detail
  • Example response
  • Related
Powered by AskMavis