Any API calls to transfer calls to Queues in Freshcaller

Hi Guys,

I have an app functionality to transfer a call to a particular call queue(Queue A) based on hours. is there an API call to transfer calls to queues?

Thanks,
Tejasri

1 Like

Hi @Tejasri_Kalluri
I hope there is no public API available to transfer calls to queues, I will check with the product team and get back to you.

Thanks,
Santhosh

1 Like

Hi @Tejasri_Kalluri,

How are the hours determined?

If it is also configured as a part of the app, then we can try using a custom action under routing automation to route the call to a particular queue.

Let me know if this works for you?

3 Likes

Hi @Arjun_Paliath,

Yes, hours will be configured. I will check and let you know

1 Like

Sure, do let me know if you need anything else.

I have added the links to the Routing Automation Documentation below.

  1. Configuring Routing Automation Call Flow : Freshcaller
  2. Overview of Routing Automation : Freshcaller
  3. Routing Automation - Custom Actions
3 Likes

Hi @Arjun_Paliath,

I go with sample app form documentation as for me new to this functionality. I follow guidelines workflow I am unable to route the calls to another queue. Can anyone help me to route the calls?

here is my code which action.json is similar to the sample app and server.js is

exports = {
 validateVIPPhoneNumber: function (request) {
let validVIPNumbers = ['+18565021484', '+12015844716'],
response = validVIPNumbers.includes(request.input) ? 'valid' : 'invalid';
data = {
 response,
"app_variables": {}
};
 return renderData(null, { data });
 },
  validateUserSingleDigit: function (request) {
  let validVIPNumbers = ['1', '2'],
  response = validVIPNumbers.includes(request.input) ? 'valid' : 'invalid';
    // Third party API and response structure
    return renderData(null, {
 success: true, data: {
 response,
 "app_variables": {}
      }
});
 },
   validateUserMultipleDigits: function (request) {
 let validVIPNumbers = ['11', '12'],
 response = validVIPNumbers.includes(request.input) ? 'valid' : 'invalid';
 return renderData(null, {
 success: true, data: {
   response,
   "app_variables": {}
   }
  });
  },
  validateUserSpeech: function (request) {
  let regex = /(transfer)|(call)/,
 response = regex.test(request.input) ? 'valid' : 'invalid';
    return renderData(null, {
      success: true, data: {
 response,
 "app_variables": {}
}
 }); 
},
respondOrderStatus: function () {
let index = Math.floor(Math.random() * Math.max(5));
let name = ['Freshcaller', "Freshdesk", "Freshsales", "Freshchat", "Freshservice"],
response = arguments[0].input;
return renderData(null, {
success: true, data: {
 response, "app_variables": { "name": name[index], status: "in progress" }
 } 
   });
 }
};

actions.json

       {
        "validateVIPPhoneNumber": {
            "display_name": "validate VIP users based on phone numbers",
            "parameters": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "type": "object",
                "properties": {
                    "input": {
                        "type": "string"
                    }
                },
                "required": [
                    "input"
                ]
            },
            "response": {
                "type": "object",
                "properties": {
                    "user_id": {
                        "type": "string"
                    }
                }
            },
            "description": "Sends an OTP to user's registered email address"
        },
        "validateUserSingleDigit": {
            "display_name": "validate when a single digit input is given",
            "parameters": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "type": "object",
                "properties": {
                    "input": {
                        "type": "string"
                    }
                },
                "required": [
                    "input"
                ]
            },
            "description": "Sends an OTP to user's registered email address",
            "response": {
                "type": "object",
                "properties": {
                    "user_id": {
                        "type": "string"
                    }
                }
            }
        },
        "validateUserMultipleDigits": {
            "display_name": "validate when a multiple digit input is given",
            "parameters": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "type": "object",
                "properties": {
                    "input": {
                        "type": "string"
                    }
                },
                "required": [
                    "input"
                ]
            },
            "description": "Sends an OTP to user's registered email address",
            "response": {
                "type": "object",
                "properties": {
                    "user_id": {
                        "type": "string"
                    }
                }
            }
        },
        "validateUserSpeech": {
            "display_name": "validate when a users speech is transcripted and given as input",
            "parameters": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "type": "object",
                "properties": {
                    "input": {
                        "type": "string"
                    }
                },
                "required": [
                    "input"
                ]
            },
            "description": "Sends an OTP to user's registered email address",
            "response": {
                "type": "object",
                "properties": {
                    "user_id": {
                        "type": "string"
                    }
                }
            }
        },
        "respondOrderStatus": {
            "display_name": "to send the message to be played as a dynmaic message in Freshcaller",
            "parameters": {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "type": "object",
                "properties": {
                    "input": {
                        "type": "string"
                    }
                },
                "required": [
                    "input"
                ]
            },
            "description": "Sends an OTP to user's registered email address",
            "response": {
                "type": "object",
                "properties": {
                    "user_id": {
                        "type": "string"
                    }
                }
            }
        }
    }

with is my freshcaller work flow


the highlighted one is an app installed in account, and call actions is routing automation and my account type is forest. if you see in server.js validVIPNumbers array I was calling from +12015844716 to +18565021484 number.no response is coming as well as in logs. let me know what I am missing here in code and as well as testing

1 Like

Let me check @Tejasri_Kalluri, I will update you when I have an update.

3 Likes

@Tejasri_Kalluri Can you provide me with the dist file of your app?

I created a sample app for Routing automation and it worked as expected.

I will verify your routing automation setting and update you if you can share the full zip file.

1 Like

Hi @Arjun_Paliath,

This is the dist file of my custom app let me know anything needed from my end

routing.zip (3.8 KB)

1 Like

Ok @Arjun_Paliath, i will check into that

1 Like

Hi @Tejasri_Kalluri,

Apologies for the delay in getting back to you.

The sample app looks good. However, can you confirm if you have set up the workflow to accept the phone number as the input? I have attached a screenshot below.

The input should be the phone number when you are checking for VIP Numbers.

Let me know if this helps.

5 Likes

Hi @Arjun_Paliath this works for me thank you

1 Like