Update a Preference
Use the update a preference request to update an existing preference.
Endpoint
Method: POST
URL:/preference/:preferenceId
Path Parameter
Parameter Name | Data Type | Description | Required/Optional |
---|---|---|---|
| Number | The ID of the parameter to update. | Required |
Request Parameter
Parameter Name | Data Type | Description | Required/Optional |
---|---|---|---|
| String | Set the category of the preference, set to | Required |
| String | Enter a useful description for the preference, at the time of writing this is not used in the UI but will be displayed in a get preferences request. | Optional |
| String | Determine if the preference is shared (set to In addition to the standard shared or private scope, U-Capture also provides a scope for the last view that a user has used, for example if they rearrange the columns this can be remembered the next time they open the Recorded page - set | Required |
| Number | The ID of the parameter to update, this should match the | Required |
| String | Enter a useful name of the preference, this is what a user will see when they pick the preference in the U-Capture application. | Required |
| Array | Set the details that determine how the preference works, what the view will show, consisting of the following parameters, | Required |
| Array | List the metadata fields to display as columns in the U-Capture application when using the preference using a comma separated list. Columns in the UI will be displayed from left to right to match the list order (first to last). For a list of valid values at the time of writing see Valid Preference Fields. | Required |
| Array | Set the filter to automatically apply when using the preference - determining which calls are shown, see Filters for more information on filters. | Required |
| Number | A Placeholder for future enhancements, at the time of writing this is not used in the UI but will be displayed in get preferences requests. | Optional |
| Number | A Placeholder for future enhancements, at the time of writing this is not used in the UI but will be displayed in get preferences requests if a value is entered. | Optional |
Valid Preference Fields
The following list includes all of the valid metadata fields for the fields
parameter in an update preference request.
agent.department
agent.email
agent.extension
agent.firstName
agent.id
agent.lastname
agent.location
agent.manager
agent.number
agentFullName
callProperties.accountInfo
callProperties.callAudio
callProperties.callDirection
callProperties.callType
callProperties.deviceId
callProperties.endDate
callProperties.group
callProperties.integration
callProperties.licensed
callProperties.licenseStatus
callProperties.localName
callProperties.screenRecordingStatus
callProperties.sipDetails
callProperties.sourceFormat
callProperties.startDate
callProperties.trunkName
conversationId
otherParties
tenantId
Response and Error Code
Response Code | Condition |
---|---|
200 | Ok |
The above 200 Ok response shows that the preference has been updated, you can always use the get preferences request to verify that the preference has been updated.
Sample Request
{ "category":"PREFERENCE_CATEGORY_VIEW_STATE", "description":"A view to only see calls for extension 323", "scope":"ACCESS_SCOPE_PRIVATE", "id": "14441 "title":"See ext323", "viewState":{ "fields":[ "agentFullName", "agent.extension", "callProperties.startDate", "agent.location", "agent.manager", "agent.number" ], "filter":{ "groupFilter":{ "leftGroupFilter":{ "leftGroupFilter":{ "leftFilter":{ "fieldName":"agent.extension", "operator":"CONVERSATION_FILTER_OPERATOR_CONTAINS", "stringValue":"323" } } }, "operator":"CONVERSATION_LOGICAL_OPERATOR_AND", "rightGroupFilter":{ "leftFilter":{ "fieldName":"callProperties.startDate", "operator":"CONVERSATION_FILTER_OPERATOR_GREATER_THAN_OR_EQUAL", "timestampValue":"2024-06-17T23:00:00.000Z" }, "operator":"CONVERSATION_LOGICAL_OPERATOR_AND", "rightFilter":{ "fieldName":"callProperties.endDate", "operator":"CONVERSATION_FILTER_OPERATOR_LESS_THAN_OR_EQUAL", "timestampValue":"2024-09-16T22:59:59.999Z" } } } } }, "isOwner": true }