It is triggered before the forms on the script pages are validated and before disposition is set. It is run before beforeSetDisposition. It helps prevent terminating the script in special cases or saving 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} |
Optional. The desired disposition that overwrites the one that the agent selected. |
| description |
{String} |
Optional. The description of the disposition event that overwrites the one selected by the agent. |
| next_calldate |
{String} |
Optional. You can specify the callback time. It has only an effect if the selected disposition is a callback. Format: ISO 8601, YYYY-MM-DDTHH:MM:SS |
Example
If the disposition ID is not 17, then certain field values are set to 0, and they become hidden.
$().beforeValidation = function (disposition) {
if (disposition.id !== 17) {
vcc.setFieldValue("field1", 0);
vcc.getController("data", "field1").hidden = true;
vcc.setFieldValue("field2", 0);
vcc.getController("data", "field2").hidden = true;
return true;
}
};
Comments
Can’t find what you need? Use the comment section below to connect with others, get answers from our experts, or share your ideas with us.
There are no comments yet.