How to use the Customer field in Vapi Dashboard
# support
w
Hi, In the Vapi Dashboard tou can go to Observe -> Call Logs. In Call logs you have the following headings: Type, Call ID, Call Cost, Ended Reason, Assistant, Phone Number, Customer, Start Time (GMT+1), Duration. How do I make use of the Customer field? Currently both phone number and Customer says N/A on all my calls (I use web calls so it makes sense for there to be no phone number). Is it possible to add a userID or "Customer" at the beginning of a web call? I am looking for this feature and I am not sure if the Customer field maybe is what I am looking for. Thank you!
s
Hey Williham, please raise the feature request over here [https://roadmap.vapi.](https://roadmap.vapi.sg)ai
w
Sorry but it is not a feature request. I am asking what the Customer field in the dashboard does and how to utilise it
s
Customer field contains customer phone number , and more info if customer record is created.
w
But there is a separate field for phone number. Observe -> Call Logs In Call logs you have the following headings: Type, Call ID, Call Cost, Ended Reason, Assistant, Phone Number, Customer, Start Time (GMT+1), Duration. How do I make use of the Customer field? How do I create what you call customer record? Is it only for phone calls or also for web calls? Can I pass Dynamic Variables in the begining of a web call with a userid in the customer field somehow? Thank you for your time in this matter!
s
@Williham The Customer field can be used for phone calls only. The
start
method signature:
Copy code
typescript
start(assistant?: CreateAssistantDTO | string, assistantOverrides?: AssistantOverrides, squad?: CreateSquadDTO | string)
The customer information should be passed in the CreateCallDTO which is used when creating a call. THere's no a direct way to pass customer information in web calls through the current SDK interface.
Copy code
ts

class CustomerUserEditable {
  /**
   * This is the number of the customer.
   */
  @MinLength(3)
  @MaxLength(40)
  number?: string;

  /**
   * This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it.
   *
   * Use cases:
   * - `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks.
   * - `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.
   *
   * If `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\+?[a-zA-Z0-9]+$/`).
   *
   * @default true (E164 check is enabled)
   */
  @ApiPropertyOptional({ default: true })
  numberE164CheckEnabled?: boolean;

  /**
   * This is the SIP URI of the customer.
   */
  sipUri?: string;

  /**
   * This is the name of the customer. This is just for your own reference.
   *
   * For SIP inbound calls, this is extracted from the `From` SIP header with format `"Display Name" <sip:username@domain>`.
   */
  @MaxLength(40)
  name?: string;

  /**
   * This is the extension that will be dialed after the call is answered.
   */
  @MaxLength(10)
  extension?: string;
}
@Williham You can create a feature request over here: https://roadmap.vapi.ai to add customer field for web calls.
w
I did to that, but some AI tool merged it with an old feature request. Nikhil Gupta had appparently answered: "Can use assistantOverrides.metadata for this now" Is this something you know about? @User I would love to know if this is still a vaild solution and how exactly it would be implemented. I couldnt make it work. Here is the link to that for reference: https://roadmap.vapi.ai/feature-requests/p/set-customer-id-for-web-calls
s
@Williham You can now use
Can use assistantOverrides.metadata
for this. However, this won’t be visible in the customer field in the logs table. It’s a bit of a hack where you add the information and then retrieve it using the API later. If this works for you, let me know. I’ll share all the details with you.
w
What I really need is to be able to know what cutomer is responsible for what call. Let’s say a signed in user on my website starts a call. When the webhook with the callid is sent to my server, will the metadata be included in the webhook? Or how would you retrieve this customerID from the “metadata”? You are welcome to share all the details so I understand if this can work for what I need
s
When starting a web call, you can pass customer metadata through assistantOverrides:
Copy code
const assistantOverrides = {
  metadata: {
    customerId: "user_123",
    customerName: "John Doe",
    // any other customer data you want to track
  }
};

// Start the call with metadata
vapi.start(assistantId, assistantOverrides);
This metadata will be available in all webhooks sent to your server. Looking at the server message types in the code:
Copy code
*/
  assistant?: CreateAssistantDTO;
  /**
   * This is the customer associated with the call.
   *
   * This matches one of the following:
   * - `call.customer`,
   * - `call.customerId`.
   */
  customer?: CreateCustomerDTO;
  /**
   * This is the call object.
   *
   * This matches what was returned in POST /call.
   *
   * Note: This might get stale during the call. To get the latest call object, especially after the call is ended, use GET /call/:id.
   */
  call?: Call;
  /** This is the voice input content */
  input: string;
}
The webhook payload includes the full call object which contains the assistantOverrides metadata.You can retrieve this information later through the API by fetching call logs. Here's why this solution works: - The metadata is persisted with the call record - It's included in all webhooks and API responses - You can query calls using the API to find specific customer interactions - While not shown in the UI customer field, the data is accessible programmatically
6 Views