https://retellai.com/?utm_source=discord&utm_medium=seo logo
quick question: is there a way to send the Retell ...
# ❓・ai-evy-support
a
Thanks for tagging me @Juanes. I'll look through relevant sources and get back to you shortly.
### Answer Yes, there are several ways to handle call metadata for Salesforce integration. Retell AI provides multiple metadata options that can help you relate calls to Salesforce VoiceCall records [(1) ]() [(2) ]() [(3) ]() . The most direct approach is using the
metadata
field when creating or updating calls. This field allows you to store arbitrary data including your internal customer IDs or other identifiers . Here's how you can use it:
Copy code
javascript
const phoneCallResponse = await client.call.createPhoneCall({
 from_number: '+14157774444',
 to_number: '+12137774445',
 metadata: { 
   salesforce_voice_call_id: 'your_sf_id_here',
   customer_id: 'cust_123'
 }
}) ;
[(3) ]() You can also update call metadata after the call is created:
Copy code
javascript
const callResponse = await client.call.update('call_a4441234567890777c4a4a123e6', {
 metadata: { customer_id: 'cust_123', notes: 'Follow-up required' }
}) ;
[(2) ]() Additionally, Retell AI supports custom SIP headers which can carry metadata through the telephony layer [(1) ]() [(3) ]() [(4) ]() :
Copy code
javascript
custom_sip_headers: {
 "X-Custom-Header": "Custom Value"
}
[(1) ]() For Salesforce integration specifically, Retell AI supports webhook endpoints that can push real-time call data to external systems, which would include the call_id and any metadata you've set [(5) ]() . The platform also provides telephony identifiers when available for tracking purposes [(1) ]() [(3) ]() [(4) ]() . However, regarding transferring metadata through SIP trunks with call transfers, this feature is not currently supported but has been noted for potential roadmap inclusion [(6) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.