URGENT: Blank / Empty Email Notifications
# support
f
Email Notifications that are sent to the client with customer information are now suddenly blank with no data. This is urgent as the client is missing important leads. Our team observed that Vapi is sending blank data to the Functions Tool and this Functions Tool has nothing to forward to the client. Attached is a screen shot of the information that Vapi is sending which has blank fields compared to what it should look like. Call ID: 3d8fa8e5-6ec6-4bf7-8da8-36226b13c97c Call ID: 9cceb3ac-f0dc-4977-80a0-e3fd1b3c33ff Call ID: f3215b4d-3b57-4060-a57d-775ceeae859b (no notification sent at all) https://cdn.discordapp.com/attachments/1352444807108362240/1352444807447838750/Empty_Data.png?ex=67de09e1&is=67dcb861&hm=70faedcd8eb2cf8b4e203bbca73e5daf16904f0f81b4698eaf47989c46868fc7& https://cdn.discordapp.com/attachments/1352444807108362240/1352444807888502804/Filled_data_-_tool.JPG?ex=67de09e1&is=67dcb861&hm=0c9e61a2af8690dd4b29bac1830b33e936d16a81129d8fc8dd6390c743b1856c&
k
While going through your call logs, I understand it's a prompting issue. Whenever you define a tool,
[1]
you need to add its usage purpose and expected input parameters inside the tool description. Also, add some description to the input parameters. Ensure the description you add is similar to the call transfer so that the higher similarity score the LLM invokes your tool with the required parameters. Now, the `[2]`second thing inside your prompt where you trigger this tool call. You have to trigger the tool call by listing the tool name with the parameters you want to pass through the tool.
example
trigger the toolName with parameter1, param2, ..., paramN These two changes will ensure your tools are always called with the required parameters. Make these changes and let me know how this goes for you?
s
[EXAMPLE] Here's a complete example for your specific case of handling customer information in email notifications: ## 1. Tool Definition Example:
Copy code
{
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "sendCustomerNotification",
        "description": "Sends an email notification containing customer information collected during the call. This tool ensures all customer details are properly formatted and delivered to the client. Use this whenever customer information needs to be forwarded to the client's system.",
        "parameters": {
          "type": "object",
          "properties": {
            "customerName": {
              "type": "string",
              "description": "The full name of the customer (first and last name) as provided during the call"
            },
            "customerEmail": {
              "type": "string",
              "description": "The valid email address provided by the customer for contact purposes"
            },
            "customerPhone": {
              "type": "string",
              "description": "The phone number provided by the customer in format: +1XXXXXXXXXX"
            },
            "inquiryDetails": {
              "type": "string",
              "description": "A detailed summary of what the customer is inquiring about or interested in"
            },
            "callId": {
              "type": "string",
              "description": "The unique identifier for this call in the Vapi system"
            },
            "urgencyLevel": {
              "type": "string",
              "enum": [
                "low",
                "medium",
                "high",
                "urgent"
              ],
              "description": "How quickly the client should follow up based on customer's stated timeframe"
            }
          },
          "required": [
            "customerName",
            "customerEmail",
            "inquiryDetails",
            "callId"
          ]
        }
      }
    }
  ]
}
## 2. Tool Call Trigger in Your Prompt:
Copy code
When a customer provides their contact information and inquiry details, you should always capture and store this information. Once you have collected all the necessary customer details, trigger the sendCustomerNotification tool with customerName, customerEmail, customerPhone, inquiryDetails, callId, and urgencyLevel.

For example, if John Smith calls asking about premium services, you would:

1. Collect his information during the conversation
2. Before ending the call, you would send the notification by thinking: "I need to send this customer information to the client system"
3. Then trigger the sendCustomerNotification tool with customerName: "John Smith", customerEmail: "john.smith@example.com", customerPhone: "+14155552671", inquiryDetails: "Interested in premium service package with additional support options", callId: "[current_call_id]", urgencyLevel: "high"
7 Views