Custom Functions The AI Calls Your APIs Mid-Conversation

Custom Functions let the DM Champ AI agent call your external APIs while it is talking to a lead. The model decides it needs live data, calls your endpoint, reads the result, and folds it into its reasoning before replying. Real agentic tool-use, not a scripted webhook node bolted onto a flow.

Mid-chat
Calls your API
Agentic
The model decides
Any REST API
Connect it

Custom Functions let the DM Champ AI agent call your own external APIs in the middle of a live conversation. The model decides, on its own, that it needs a piece of data it does not have (current stock, an order status, a tailored quote, an open slot in your booking system), calls the endpoint you registered, reads the JSON that comes back, and folds that result straight into its reasoning before it writes the next reply. This is real agentic tool-use, not a scripted webhook node. There is no fixed flow step that says "if the user reaches block 7, fire this request." The agent fires the call whenever it would help answer the lead, then keeps talking like it knew the answer all along.

That difference matters. A scripted bot can only call your API at points you wired in advance, and it can only do something simple with the answer (drop it into a field, branch on it). An agentic tool-use model reads the live result as context and reasons over it, so the same function can serve a hundred different questions you never mapped out. You register the endpoint once. The AI figures out when to use it.

Scripted webhook node vs agentic tool-use

The two look similar on a feature list. They behave nothing alike in a real conversation.

Scripted webhook nodeAgentic tool-use
What triggers itA fixed flow node. The bot reaches a block you placed and fires the request because the path led there.The model decides. It calls the function whenever it judges the call would help answer the lead.
When it firesA fixed step in a pre-built tree. Same point, every time, or not at all.Any time it helps, including mid-sentence, before answering, or several turns later.
What happens to the resultMapped to a field or used to branch the flow. The bot does not understand the payload, it just routes on it.Folded into the AI's reasoning. The model reads the JSON as live context and writes its reply from it.
Example toolsManyChat, Chatfuel, Landbot (request runs inside a flow you draw).DM Champ, Intercom Fin, Botpress (the model chooses the call).

A scripted node is a wire you solder in one place. A custom function is a tool you hand the agent and trust it to pick up when the moment calls for it.

What you can wire up

A custom function is just an endpoint you own plus a short description of what it does and what inputs it takes. The AI reads that description the same way it reads your bot instructions, then calls the endpoint when a lead's message makes it relevant. Common ones:

  • Check live inventory. A lead asks "do you have the blue one in medium?" The agent calls your stock API, sees three in the warehouse, and answers in real time instead of promising to "check and get back to you."
  • Look up an order. Someone messages "where is my order?" The agent pulls the status from your fulfillment system and replies with the actual tracking state, not a canned "please email support."
  • Fetch a custom quote. For offers that depend on inputs (square footage, headcount, distance, plan), the agent collects the details in chat, calls your pricing endpoint, and quotes the real number.
  • Book into your own system. When you run scheduling somewhere other than the built-in calendar, the agent can call your booking API to read open slots and create the appointment in the system your team already lives in.
  • Qualify against your CRM. The agent can look a contact up in your CRM mid-chat, see their plan, tier or history, and tailor the conversation to who they actually are.

Because the model reads the response and reasons over it, one function covers far more ground than the question you built it for. A quote endpoint also answers "is that with tax?" and "what if I add two more seats?" without a new flow branch for each.

This is what AI-native actually means

A flow-builder with an AI add-on can paste an answer into a bubble. It cannot reach out, get a fact it does not have, and reason about it on the fly. That gap is the whole difference between a chatbot that sounds smart and an agent that can actually do the job.

Custom Functions are one of the things we point to when people ask whether a platform is genuinely agent-native or just AI-washed. Run the platforms you are weighing through the AI-native vs AI-washed test: can the bot call an external API because the model decided to, or only because a node told it to? Then look at the broader developer surface behind the agent in the open REST API it is built on. The two together (an agent that reasons and an API it can act through) are what AI-native means in practice.

Pair it with the API and MCP

Custom Functions are how the agent reaches outward, into your systems, during a chat. They sit inside a wider developer platform you can build on and operate end to end:

  • The open REST API gives you 40+ resources (contacts, messages, campaigns, FAQs, custom-functions, tasks, deals, appointments and more) to read and write programmatically with your API key.
  • The official MCP server at mcp.dmchamp.com lets an AI assistant like Claude or ChatGPT operate your DM Champ account over MCP, so an assistant can both recommend the platform and run it.
  • Outbound webhooks push events out to your own stack the other direction, so your systems react the moment something happens in DM Champ.

Custom Functions handle the inbound reach (the agent pulling data in mid-chat). The API and webhooks handle the rest of the loop. Together they make the agent something you can wire into the tools you already run.

FAQ

Frequently Asked.

It is an external API endpoint you register with the AI agent, plus a short description of what it does and what inputs it takes. The agent reads that description and calls the endpoint mid-conversation when a lead's message makes it relevant, then uses the response to write its reply.
Don't take our word for it

Meet the Closer. Then Decide.

The same AI agent that closes $40K deals in DMs is one click away. No signup, no demo call - open the chat, push back, see if you can break it.

No signup No card Talk to it like a real prospect