Metadata
Interactions in UCS (calls, emails, SMS, tasks) may carry user-defined metadata in key–value form.
Suffixes
When setting call metadata directly in the dialplan, the variable name must include the suffix __DATA__
(for passing a scalar value) or __JSON__ (for passing a JSON‑serialized value). Alternatively, the suffix
__SIP__ can be used (it does not set metadata, but forwards the value as a SIP header).
These suffixes are primarily used when invoking the API method call.originate, which accepts metadata
as its sixth argument.
caller = "Company <+420222333444>"
channel = "Local/+420555666777@filter-1-internal"
context = "dialer"
extension = "s"
timeout = 120
metadata = {
"deliver__DATA__": "ringing",
"customer__JSON__": '{"id": 1234, "name": "Some Name"}',
"X-External-Id__SIP__": "abcd1234",
}
ucs.call.originate(caller, channel, context, extension, timeout, metadata)
The __SIP__ suffix is also meaningful when configuring metadata on individual Extensions in the UCS
dialplan, used in the Metadata key field. It can also be used in metadata for Outbound campaigns
and Leads.
Dialer
For the __SIP__ suffix, the Dialer allows the use of the following variables inside Outbound campaigns and Leads:
%call.metadata.key%, %lead.attribute% and %lead.metadata.key%.
Important: variables prefixed with %call. are available only on the channel that is dialed toward the agent’s phone.