Three moments, three pieces
By your system we mean wherever you already work, such as your CRM, your management software, your ERP or an n8n automation of yours. Lera does not ship a connector for every brand. Your agent talks to your system through a web address that whoever runs it gives you, and anything that can receive a request over the internet will do.
During the call, with functions. A function is a question or a task the agent gives your system in the middle of the conversation, like checking an order or logging a job, and it carries on talking with the answer.
Before answering, with Know who is calling. Lera asks your system whose number is calling, so the greeting can already include their name.
When the call ends, with end-of-call actions and the Post-call webhook. A webhook is an automatic message one system sends another. Here Lera sends your system each call once it is over, with its summary and the data collected.
The difference matters. Anything the agent needs to know while it is talking goes in a function. Anything that only has to reach your system once the call is over goes at the end, so the caller is not left waiting on the line.
Functions, during the call
At a distributor, for example, a customer calls about their order. The agent asks for the order number, checks it with your system through a function and tells them it ships tomorrow morning. All on the same call.
You create them in your agent. Open your agent in Agents, go to Tools, click Add and choose New function.
Give it a name, like check_order, and a description that tells the agent when to use it, in your own words, for example “when they ask about the status of their order”.
Under Endpoint, paste your system’s web address, which has to start with https. Under Parameters, add the details the agent must ask for before it checks, like order_number.
Below it you have “What your system will receive”, the exact message your system will get, ready to copy and hand to whoever builds your side. The details the agent asks for go inside input, with the names you gave them.
If a detail can only be one of a few options, like the insurer or the trade, fill in “only these options”. Your system will always receive one of them, written exactly as you entered it.
What your system needs to know
While your system answers, the caller is waiting on the phone. Lera waits 8 seconds by default, and you can raise that in the function settings if your system really is slow.
The request is not repeated. If your system fails, the agent finds out and says so naturally, without treating the task as done, because retrying on its own mid-conversation could log the same job twice. Each request carries the call ID, so your system can avoid recording the same thing twice.
Have your system reply with phrases that can be said out loud, like “thirty-two euros fifty”, and with few options. The reply is cut at 6,000 characters, so a long list is better filtered first.
If your system takes more than a second, turn on “Spoken message while it runs” with a phrase like “One moment, let me check” and choose “Only if it is slow”. That way it only plays when there really is a wait.
In panel tests, the function can return a “Test response” instead of calling your system. On real calls it always calls your address. Each request also says where it comes from, the phone, your website or a test, so your system does not store test data as if it were real.
When the call ends
End-of-call actions belong to each agent. Open your agent, go to Actions when the call ends, click Add and choose Custom function, which sends the call data to an address of yours. They run after the post-call analysis, so they can carry what the analysis has just extracted, and with “Configure conditions” you decide which calls they are sent for.
With “Try it on a call” you pick a call from your history and see what would have been sent, without sending anything.
The Post-call webhook covers the whole project. In Integrations, connect it and paste your system’s address under “Webhook URL”. When each call ends, from any of your agents, Lera sends the summary, the intent, the sentiment, the analysis data and the transcript. If your system does not respond, it is tried up to three times.
For what happens before answering, Know who is calling has its own guide, with what your system receives and what it has to reply.
How your system checks the request comes from Lera
Every request is signed. It carries three headers, x-lera-signature, x-lera-timestamp and x-lera-nonce, and the signature is an HMAC-SHA256 of the timestamp, the nonce and the body exactly as received, computed with your project’s secret.
The secret is at the bottom of Tools, under “Verify requests · view signing secret”. There is one per project, and it signs functions, Know who is calling and the Post-call webhook alike.
Whoever builds your side has to recompute the signature over the body exactly as received, compare it in constant time and store the nonce, so nobody can resend the same request. If you also want a key of your own, put it in a header and not in the address, because a full address ends up written in your server logs.
What to know
If you are on a plan, connecting your system, meaning functions, Know who is calling and end-of-call actions that call your system, comes with the Professional plan and above, and the API and the MCP with the Advanced plan. Cal.com and email notifications come with all of them.
If what you want is to book appointments in Cal.com, you do not need a function of your own. Your agent has a built-in Cal.com connector, added from Tools.
If your agent wipes personal data when the call ends, the Post-call webhook already goes out with markers in its place. Functions during the call and end-of-call actions, on the other hand, carry the data as it is.
When a function fails, Call history shows the reason next to it, for example “your system did not reply in time” or “your system replied 500”.
Before opening it to your customers, make a real call, because in the panel test the function may be returning its test response.
Frequently asked questions
Do you have a connector for my ERP? There is no connector per brand. The function points at your system’s web address, so anything that can receive a request over the internet works, directly or through n8n.
Can I use n8n? Yes. Paste the address of your n8n workflow into the function and have the workflow reply with what the agent should say.
Do I need to know how to code? Not in the panel. What you need is a web address that receives the request and replies, and whoever runs your system sets that up. You can also ask Maite, the panel’s assistant, with something like “add a function that checks the status of an order, the address is…”.
What if my system is down? With a function, the agent says so and the call carries on without assuming anything. With the Post-call webhook, it is tried up to three times.