Brekeke Contact Center Suite Wiki

CRM - Change Agent State from Wrapup to Ready

Step 1. Set the following script at [tenant] > [Script] on Brekeke CRM

Sample: agentview

Agent status is automatically changed to “Ready” just 10 sec past after the agent status becomes “Wrapup”.

var init = function(){
    //registed once
    window.crm_customer_func_registed = true;
    var agentWidget = Brekeke.CTI.DCIWorkView.getAppSpace();
    var TIMEOUT_WRAPUP = 10 * 1000;//10 sec
    var intervalId = null;
    var onAgentStateChanged = function(ev){
        if(ev.agentState == Brekeke.CTI.DCIWorkView.Constants.AGENT_STATE_WRAPUP){
            //change to ready after 10 sec when wrapup until success
            intervalId = setInterval( function(){
                //set value to view items for successfully commit contact result
                var result =;
                  var info = agentWidget.getAgentInfo();
                                    {agentId:info.agentId,agentState:Brekeke.CTI.DCIWorkView.Constants.AGENT_STATE_READY,agentStateReason:'by myself'},"");
            }, TIMEOUT_WRAPUP );
        } else {
            //stop loop because task completed
                intervalId = null;


    //regist event handle



Step 2. Set the script function.

At [Advanced Settings] on the [Project Screen] page of the project or workspace on Brekeke CRM, set the script to be called when the agent status is changed.

Yes No
Suggest Edit