API object in Metadata (v3)
Multimedia Ingestion v2 behavior is allow_missing_agent = true and no ability to set the default_agent_id. Multimedia Ingestion v3 supports an optional <<api_object>> for handling cases where the agent_id is missing.
It is still possible to send a metadata POST without an agent by including the <<api_object>>. If the session Agent ID is not missing or the PBX login ID-based lookup fails, a default Agent ID can be provided.
|
API object element |
Type |
Required |
Description |
|---|---|---|---|
|
api.allow_missing_agent |
Boolean |
false |
If allow_missing is false and the agent can’t be resolved, a 4xx error is returned. The error provides specific details about the problem. By setting the value to true, the API can be forced to accept the POST without an agent_id present. This behavior is similar to how the v2 api worked. The agent can be resolved with the pbx_login_id, in which case allow_missing_agent is not required. |
|
api.default_agent_id |
Integer |
false |
If the …sessions[].agent_id is missing then this default value will be used if valid. |
Ingestion v3 Examples
|
Request |
Response |
Comment |
|---|---|---|
|
api.allow_missing_agent : no effect api.default_agent_id : 123 * contacts[].sessions[].agent_id : blank or not provided contacts[].sessions[].pbx_login_id : not provided or provided but no employee found * agent_id 123 is valid in the system. |
201 Created |
The result is a session marked and associated to the employee with agent_id 123. |
|
api.allow_missing_agent : false or not provided api.default_agent_id : blank or not provided contacts[].sessions[].agent_id : blank or not provided - contacts[].sessions[].pbx_login_id : not provided |
400 Bad Request |
The result is a 400 Bad Request, which indicates that none of the required details are provided in the request.. |
|
api.allow_missing_agent : false or not provided api.default_agent_id : 123* contacts[].sessions[].agent_id : blank or not provided contacts[].sessions[].pbx_login_id : provided but no employee found * agent_id 123 is NOT valid in the system. |
409 Conflict |
The result is a 409 Conflict to indicate that no employee exists with id 123 (default_agent_id). |
|
api.allow_missing_agent : true api.default_agent_id : 123* contacts[].sessions[].agent_id : blank or not provided contacts[].sessions[].pbx_login_id : not provided or provided but no employee found * agent_id 123 is NOT valid in the system. |
201 Created |
Because a missing agent is explicitly allowed, the request is accepted. However, the invalid agent_ID 123, specified as the default, is not used. |