rival-black•2h ago
Error Getting All Details in Campaign and API request
When I'm making Campaign call, It's not using all details in csv. It supposed to use Name and all other info I've added in csv data for campaign. Instead it's only making call to phone number.
Even when I'm trying to make API Call, still it's not using all data that we have.
5 Replies
To ensure all customer details from your CSV (like name, email, etc.) are used in campaign calls, structure your API request so each customer object includes all relevant fields. For example:
Make sure your CSV import maps each column to the corresponding property in the
customers array before making the API call. See the API documentation for all available fields.
Source:
- Create Campaign API documentation⤵️ Mention @Vapi Support Bot for follow-ups 🐥
rival-blackOP•1h ago
@Vapi Support Bot {
"assistantId": "a750022f-dfaa-4525-acef-4af9382f8449",
"phoneNumberId": "f7d61175-3d61-4eac-aad9-9d5200754609",
"customer": {
"number": "+1{{contact.phone}}",
"name": "{{contact.first_name}} {{contact.last_name}}"
},
"assistantOverrides": {
"variableValues": {
"ghlContactId": "{{contact.id}}",
"ghlFirstName": "{{contact.first_name}}",
"ghlLastName": "{{contact.last_name}}",
"ghlEmail": "{{contact.email}}",
"campaign": "old-number-reactivation"
}
}
}
Your API request should use a "customers" array (not "customer" singular) to include all customer details. Here’s the correct structure:
Update your request to use "customers" (plural) as shown above to ensure all details from your CSV are included.
See the API documentation for more details. Source: - Create Campaign API documentation
See the API documentation for more details. Source: - Create Campaign API documentation
rival-blackOP•1h ago
@Vapi Support Bot But still it's not using all the details we sent. Like if we have the name John D. it should say Hi Jodn D. but it doesn't know what the name.
To ensure the assistant uses the customer's name (e.g., says "Hi John D."), make sure you both include the "name" field in each customer object and reference it in your assistant's prompt or script using a variable. For example, in your assistant's configuration, use a variable like
Hi {{name}}, how can I help you? See the API documentation for more details. Source: - Create Campaign API documentation
{{name}}:
Then, in your assistant's greeting prompt, use:Hi {{name}}, how can I help you? See the API documentation for more details. Source: - Create Campaign API documentation