XML metadata
If you chose the XML metadata format, one XML file per audio file has to be uploaded.
Naming the XML file
In order to link the audio to its metadata, it is expected to give them the same name. For example:
a_first_audio.mp3
anda_first_audio.xml
a_second_audio.wav
anda_second_audio.xml
a_third_audio.mp3
anda_third_audio.xml
Mapping
In order for data within XML files to be forwarded to Activate API or to be available to third party integrations, a mapping must be defined. This mapping will fetch, thanks to an XPath definition, values in XML file, and associate the found value to a key in our own system.
Custom call date
Getting a date from the XML file is mandatory. A valid XPath v3.0 must be provided. Calls without a date won't be processed.
Custom metadata
Other metadata can be kept within our platform. These data will be exposed in the Activate API payload.
We store metadata as a one dimension key / value JSON. So an XPath must be associated to a key name. For example:
duration: /root/call/duration
phonenumber: /root/call/caller/phonenumber
With the following XML file:
<?xml version="1.0" encoding="UTF-8" ?>
<root>
<call>
<id>aze</id>
<duration>123</duration>
<date>2022-04-27T10:12:14Z</date>
<caller>
<firstname>Jane</firstname>
<lastname>Doe</lastname>
<phonenumber>+33102030405</phonenumber>
</caller>
</call>
</root>
We would expose in Activate API the following:
{
...
"metadata":{
"duration": "123",
"phonenumber": "+33102030405"
}
}
In case one XPath matches several nodes, the several values will be returned concatenated.