cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
154
Views
0
Helpful
0
Replies

API Call Not Triggering in Engaged State

uzair.anwar
Level 1
Level 1

I am encountering a strange issue in my Web ex cc widget where an API call using the Zoho CRM SDK works in certain states but not in others.

 

processSelectEntity(selectedValue) {
    console.log("Data received to open the record:", selectedValue);
    const [recordId, interactionId] = selectedValue.split('|');
    console.log("Record ID:", recordId);
    console.log("Interaction ID:", interactionId);

    let entityToOpen = this.noRecordFound ? this.noMatchEntity : this.crmDefaultEntityName;
    entityToOpen = this.mapEntityName(entityToOpen);
    console.log(`Attempting to open record. Entity: ${entityToOpen}, Record ID: ${recordId}`);

    ZOHO.CRM.UI.Record.open({ Entity: entityToOpen, RecordID: recordId })
        .then((res) => {
            if (!res) {
                console.warn(`Failed to open record. Entity: ${entityToOpen}, Record ID: ${recordId}`);
            } else {
                console.log(`Record opened successfully. Entity: ${entityToOpen}, Record ID: ${recordId}`);
            }
        })
        .catch((error) => {
            console.error(`Error while opening record. Entity: ${entityToOpen}, Record ID: ${recordId}`, error);
        });
}

 

Behavior Observed:

  1. The function works perfectly when the agent is in Idle or Available states.
  2. When the agent is in Engaged state (call is active and connected), the API call is not triggered:
    • No error is shown in the browser console.
    • No network request is visible in the network tab.

Main Concerns

  1. Are there restrictions or conditions  that might prevent API calls during certain states (e.g., "Engaged")?
  2. Could the engaged state be blocking requests at the browser or SDK level?
  3. How can I debug or overcome this issue?

Any help or guidance would be greatly appreciated. Thank you!

0 Replies 0