https://retellai.com/?utm_source=discord&utm_medium=seo logo
Cannot send a constant in a custom function
# ❓・bug-report
i
A constant 'locationId' is defined in a custom function:
Copy code
{
  "type": "object",
  "required": [
    "phone",
    "locationId"
  ],
  "properties": {
    "lastName": {
      "type": "string",
      "description": "Caller's last name"
    },
    "firstName": {
      "type": "string",
      "description": "Caller's first name"
    },
    "phone": {
      "type": "string",
      "description": "Caller's phone number (primary identifier)"
    },
    "locationId": {
      "type": "string",
      "const": "dz...Z"
    },
    "email": {
      "type": "string",
      "description": "Caller's email address (optional)"
    },
    "companyName": {
      "type": "string",
      "description": "Company name (optional)"
    }
  }
}
. When the function is invoked, the field 'locationId' is not being sent:
Copy code
Tool Invocation: create_ghl_contact
tool_call_id: d06ab5cbefe2e1b9

{
  "lastName": "Ivan",
  "firstName": "Ivan",
  "phone": "+1...",
  "email": "ivan@gmail.com",
  "companyName": null
}
https://cdn.discordapp.com/attachments/1451407622204030988/1451409288970109048/image.png?ex=694611bc&is=6944c03c&hm=bd05c57124bb08f2022ed57b6e62e4d31054a7be0bcf67a367e9d7742c5794d7&
o
Hello @Ivan , it will be sent but it will not appear on the tool Invocation,