AI Evy
08/21/2025, 2:13 PMAI Evy
08/21/2025, 2:15 PMmetadata 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:
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:
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) ]() :
javascript
custom_sip_headers: {
"X-Custom-Header": "Custom Value"
}AI Evy
08/21/2025, 2:15 PMAI Evy
08/21/2025, 2:15 PMAI Evy
08/21/2025, 2:15 PM