https://retellai.com/?utm_source=discord&utm_medium=seo logo
I need to setup a custom function, this is the str...
# ❓・ai-evy-support
h
@AI Evy I need to setup a custom function, this is the structure: { "name": "send_calibration_email", "description": "Send a calibration certificate email to a customer for a specific tool", "url": "https://your-domain.com/retell/send-calibration-email", "parameters": { "type": "object", "properties": { "emailAddress": {"type": "string", "description": "Customer's email address"}, "companyName": {"type": "string", "description": "Customer's company name"}, "toolIdentifier": {"type": "string", "description": "Tool serial number or identifier"} }, "required": ["emailAddress", "companyName", "toolIdentifier"] } } show me steps by steps so I can use it in the prompt of my voice agent
a
Thanks for tagging me @hergustone. I'll look through relevant sources and get back to you shortly.
### Answer Here's how to set up your custom function step by step: ## Setting Up the Custom Function 1. Add custom function in dashboard - Click "+ Add" in the tools section and select "Custom Function" from the dropdown menu [(1) ]() . 2. **Configure function details**: - Name:
send_calibration_email
- Description:
Send a calibration certificate email to a customer for a specific tool
3. Select HTTP Method - Choose POST (required for functions with parameters) . 4. Add endpoint URL - Add your URL: ` . 5. Define parameters using your JSON schema :
Copy code
json
{
  "type": "object",
  "properties": {
    "emailAddress": {
      "type": "string",
      "description": "Customer's email address"
    },
    "companyName": {
      "type": "string", 
      "description": "Customer's company name"
    },
    "toolIdentifier": {
      "type": "string",
      "description": "Tool serial number or identifier"
    }
  },
  "required": [
    "emailAddress",
    "companyName", 
    "toolIdentifier"
  ]
}
6. **Configure speech behavior**: - Enable "Speak during execution" for user-facing actions - Enable "Speak after execution" to continue conversation after completion ## Updating Your Agent Prompt 7. Update prompt for function - Include explicit instructions in your prompt about when to invoke the custom function :
Copy code
When the customer requests a calibration certificate and provides their email address, company name, and tool identifier, please send the calibration certificate email by calling the `send_calibration_email` function.
Your endpoint will receive a POST request with the function name and parameters when the LLM determines it should be called .
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.