API
...
Digital Human Configuration
Advanced Conversational Settin...
Metadata in Conversation Tools
5min
when using conversation tools with a digital human, you automatically receive metadata along with the llm's response this metadata provides valuable context about the conversation and the user please ensure the digital human is created with the operation mode set to " oc " the metadata is provided as a json object with the following fields session metadata an object containing details about the conversation session org id the unique id of the organization the digital human belongs to head id the unique id of the digital human public org id a human readable identifier for the organization public head id a human readable identifier for the digital human user id a unique id assigned to the user for this session session id a unique id for the current conversation session username the username of the user (set by default as "anonymous") timestamp the timestamp of the message in utc (iso 8601 format) request metadata an object containing additional metadata about the user's request essential origin domain the domain from which the user initiated the conversation device info information about the user's device device type (e g , "desktop", "mobile", "tablet") browser family (e g , "chrome", "firefox", "safari") language pref the user's preferred language (e g , "en us") technical session hash a hash value associated with the session request secure indicates whether the request was made over https (true/false) with other integrations (such as zapier), the metadata payload may contain user defined tool parameters, for example email the user's email address company the user's company example conversation tool configuration with metadata here's an example of how to configure a conversation tool to save user details, along with an example of the metadata received in the response { "conversationsettings" { "tools" \[ { "url" "https //url com/webhook", "name" "saveuserdetails", "parameters" \[ { "name" "email", "type" "string", "description" "email of the user" }, { "name" "company", "type" "string", "description" "company where the user works" } ], "description" "use this tool to save user details" } ] } } example of a metadata response { "email" "email\@example com", "company" "companyx", "session metadata" { "org id" "12c12ee1 ad12 1212 12ab 12345", "head id" "123456138b2c5c0578ca8818", "public org id" "testorganization", "public head id" "headid name", "user id" "f1shkifknt5g123tmrvyvw", "session id" "121212ffb 1e1c 1212 a1f1 121ac121ec1e", "username" "anonymous", "timestamp" "2025 02 24t11 07 04 472719z", "request metadata" { "essential" { "origin domain" "https //chat unith ai", "device info" { "device type" "desktop", "browser family" "chrome" }, "language pref" "en us" }, "technical" { "session hash" "012bd01cba0b01fc", "request secure" true } } } } use cases for metadata conversation logging the session id and timestamp are crucial for logging and reconstructing conversations user identification the user id, email, and username can help identify users (instructions for managing the 'username' field from the frontend will be available shortly ) contextualization the device info and language pref can be used to tailor responses to the user's context analytics the metadata can be used to gather insights into user behavior and platform usage security the origin domain and request secure fields can be used for security and fraud prevention the metadata capturing using zapier integration (coming soon )