Using API to Send Agent Data: Metadata Approach Explained

·
·

Hi team! Cheers from Mexico! working with the API to trigger Agent calls. Wondering how to SEND THE AGENT data to use in the call. Specifically a Name and Car model. Do we send this info as a metadata? (metadata.additional_data_1) and then.. how can we reference it on the call? is there a way to call meta data on the agent speak node? Thanks!

  • Avatar of Tony K
    Tony K
    ·
    ·

    Tuyo Isaza They don't currently have an API entry for call a number (although it would be VERY NICE for them to add it :D), just call a contact. You need to add the contact first through the API and then use the contact ID. I would check to see if the contact exists (GET https://api.thoughtly.com/contact) and then if not, add it (POST https://api.thoughtly.com/contact/create). Both of those will return the contactID Then use: POST https://api.thoughtly.com/contact/call { "contact_id": "$contactID", "interview_id": "$agentID", "metadata": { "callerName": "$firstName", "callerModel": "$carModel", "additionVariable": "$extraInfo" } } Then inside 1.0 it is {$callerName} and in 1.5 it is {{metadata.callerName}}

  • Avatar of Tuyo Isaza
    Tuyo Isaza
    ·
    ·

    THANKS!!