global.beforeSetDisposition

Reading Time: 1 minute

Triggered before allocating the selected disposition. Helps prevent terminating the script on special cases or save the comment history into a field.

Parameters
Name Type Description
comment {String} the comment written by the agent
disposition {Object} the selected disposition
Returns
Type Comment
{Boolean} If true, disposition is allowed, if false, disposition isn’t allowed
{Object} Disposition object
Disposition object
Key Type Description
dispositionId {Int} The desired disposition that overwrites the one which was selected by the agent.
next_calldate {String} Optional. You can specify the callback time. It has only effect if the selected disposition is a callback. Format: ISO 8601, YYYY-MM-DDTHH:MM:SS
Example

If there are no ordered items, do not allow ordered dispositions.

$().beforeSetDisposition = function(disposition, comment) {
     if (!vcc.isSelected('ordered_items') && disposition.assesment === vcc.DISPOSITION_ORDERED) {
         vcc.alert('There are no ordered items, you cannot select a successful disposition');
         return false;
     }
};

Allows updating the disposition (to any dispositionid) selected by an agent in the script.

$().beforeSetDisposition = function(disposition){
    return({dispositionId: 1, next_calldate: '2015-03-09T13:45:42'});
}

There are no comments yet.
Subscribe to our newsletter
or Contact us!
Please note that by subscribing to our newsletter, you agree to receive regular email messages from VCC Live® about service related news and updates. By subscribing to our newsletter, you also agree that VCC Live® will use your data in accordance with the applicable Privacy Policy until you unsubscribe from the newsletter.