Create a custom action
Use Custom action when you want your agent to call your own API and no template fits. You set the request, the details the agent collects, and how it signs in.
Watch on YouTube: Atlas 101 · Set up a webhook
Open the form
- Open Connections in the sidebar, then the Actions tab.
- Select New action.
- Choose Custom action (“Call your own API or webhook.”). The window is titled Create a custom action.
Two other places open the same form:
- In a job’s workflow, the step picker has a New action group with Custom action.
- On the External Actions page, select Create action, then Create from scratch. That window is titled Create Custom Action from Scratch and its button is Create Custom Action. See Tool templates.
Fill in the basics
Name, URL and Description are required. Without them the form says “Add a name, a URL and a description to create the action.”
- Name. What you call the action. The agent sees the name with spaces and symbols removed, except
_and-, cut to 64 characters. “Check order status” reaches the agent asCheckorderstatus. Pick a name that still reads well that way, such asCheckOrderStatus. - URL. The full address of your endpoint, for example
https://example.com/orders. It must start withhttps://. Atlas rejects IP addresses in private ranges (10.x.x.x,172.16.x.xto172.31.x.x,192.168.x.x,169.254.x.x) and loopback addresses other than127.0.0.1. - Description. Tells the agent when to use the action and what it does. Write it as an instruction: “Use this to look up the status of an order when the customer gives an order number.”
Purpose is optional. Pick a suggestion or type a short label, such as Booking.
Set how the request goes out
Timeout. The number is milliseconds. Atlas runs any value under 1000 as 30000, which is 30 seconds. The form limits the field to 1 to 300, so leave the default and the action waits 30 seconds.
How the details reach your system
The agent sends the parameters it collected. There is no wrapper.
GETputs them in the query string.- The other methods send a JSON body with one key per parameter.
- If you add a
Content-Typeheader ofapplication/x-www-form-urlencoded, the body is sent as a form instead. Nested values are sent as JSON text.
Use a parameter in the URL or a header
Write the parameter name in double curly braces. Atlas fills it in and removes it from the body or query string.
Make a parameter named orderNumber. Names match without regard to case, and the value is URL-encoded. If the agent has no value for a name in the URL, the call fails before it’s sent.
Parameters
Parameters are the details your agent collects from the conversation. Select Add Property for each one.
- Enter a Name. It becomes the key in the request. A name is required: “Parameter name is required”.
- Pick a Type: String, Number, Boolean, Object or Array.
- Write a Description. The agent reads it to decide what to put here. Be specific: “The customer’s order number, digits only.”
- Turn on Required if the agent must have the value before it calls.
- Optional: set a Default Value. When the agent doesn’t supply the value, Atlas fills in the default. Use it for fixed settings like a location ID.
- Optional: for a parameter with no default, turn on The agent fills this from the conversation. Use it for details the caller gives during the call, like a name, email or phone number. In agent flows, an optional input that nothing fills is dropped unless this is on. A parameter with a default can’t use it, because the server fills the default.
- For an Array, pick the Array Item Type.
Nested parameters
An Object can hold other parameters, and so can an Array of objects. Select the expand arrow on its row, then Add nested property.
Here a customer object has name and email:
The request body:
HTTP Headers
Add the headers your endpoint needs, such as an API key or a content type. Select Add Header.
- Key. The header name. Required. It can’t contain spaces, and you can’t use the same key twice.
Host,Content-LengthandTransfer-Encodingare not allowed. - Value. Sent as written on every request. You can use
{{parameterName}}here too.
For a static API key or bearer token, use a header. For an OAuth connection, use Authentication instead.
Messages
Messages are what your agent says while the action runs, so the caller isn’t left in silence. Select Add Message, then pick a type:
Each type can be used once. When all four are used the form says “All message types are already in use”. Content is required. A failed message that ends the call shows an Ends call badge.
Content is what the agent says. It can be text, or the URL of an audio file such as an .mp3 to play a recording instead.
If you add no messages, Atlas uses short built-in lines: “One moment.” at the start, “A few more seconds.” after 5 seconds, and “Sorry, something went wrong.” if the call fails.
Message changes reach a live agent once the job is saved.
Authentication
Under Authentication, choose how Atlas signs in to your API:
- None. No sign-in. You can still send a static key in HTTP Headers.
- A saved connection. Pick a saved OAuth Client Credential Connection from the list.
- Create New. Add a connection and test it without leaving the form.
See OAuth credentials for the fields and how tokens work.
Save
Select Create action. The action appears on the Actions tab under Connections, in the Custom group. Then put it on a job. See Put an action on a job.
Checks Atlas runs
Troubleshooting
- If the save says
CustomTool ServerUrl must use HTTPS protocol for security, change the URL to start withhttps://. - If the save says
CustomTool ServerUrl cannot point to private/internal networks, use a public address. Atlas can’t reach private ranges. - If the save says
CustomTool ServerSettings.Headers cannot include forbidden header: <name>, remove that header. - If a call fails with
Tool call missing required path parameter(s) in ServerUrl, a{{name}}in the URL has no matching parameter value. Add a parameter with that name, and mark it Required. - If a call fails with
Tool request failed: <status> <text> - <body>, your system answered with a non-2xxstatus. The body is your system’s reply. - If a call fails with
Authentication failed, Atlas couldn’t get a token. See OAuth credentials. - If the agent never uses the action, check two things: the job’s workflow includes it, and the Description says when to use it.
