How to get phone or customer identifier with a cal...
# support
j
is it possible to attach a customer phone number or any other customer identifier to a call made from the web widget of Vapi? Need it to map it to GHL contact IDs.
v
@jit Yes, it is possible to attach a customer phone number or any other customer identifier to a call made from the Vapi web widget. You can pass the customer's information as metadata when initiating the call. This metadata can then be used to map the call to the corresponding contact IDs in your GHL (GoHighLevel) system. If you need guidance on how to implement this, please let me know, and I can provide you with more detailed instructions or direct you to the appropriate resources.
You can continue this conversation by mentioning me in the message.
j
@Vapi how can I attach metadata to a vapi web widget call?
v
@jit To attach metadata to a Vapi web widget call, you typically need to include the metadata when you are setting up the call. This can be done by configuring the web widget with the necessary parameters that include the customer's information. Here's a general outline of the steps you might follow: 1. **Initialization**: When initializing the Vapi web widget on your webpage, you can include a metadata object within the configuration settings. 2. **Metadata Object**: Create a metadata object that contains the customer's phone number, identifier, or any other relevant information. 3. **Pass Metadata**: Pass this metadata object to the Vapi web widget during the call setup. The exact method to do this will depend on the Vapi web widget's API and how it accepts metadata. 4. **Server Communication**: Ensure that your serverUrl endpoint is set up to handle incoming metadata and map it to the GHL contact IDs. Here's a hypothetical example of how the code might look:
Copy code
javascript
Vapi.init({
    serverUrl: "https://yourserver.com/vapi-endpoint",
    // ... other configuration settings ...
    onCallInit: function(callData) {
        callData.metadata = {
            customerPhone: "1234567890",
            customerIdentifier: "CUST12345"
            // ... any other metadata ...
        };
        // Make sure to pass the metadata to your server for processing
    }
});
Please note that the actual implementation may vary based on the specific version and capabilities of the Vapi web widget you are using. If you need the exact method or code snippet, you might need to refer to the Vapi documentation or contact their support for detailed instructions tailored to your setup.
c
Yea you need to build it to do that
s
i am assuming you have already sorted the part of getting customer number or other info, then you can pass to the create call along the assistant overrides which can you later retrieve from end of call report. ref: check vapi docs for assistant ovverides https://docs.vapi.ai/server-url/events#retrieving-assistants
j
Yes, thanks
20 Views