Unable to route calls in Freshcaller

Hi team,
I developed a sample app to test routing calls in Freshcaller. The app functionality is to check for a VIP number if the response is valid then taking action as send to Call Queue. If the number is not valid then the action is considered as “Hang Up”. Along with these I placed some consoles to debug but those logs are not displaying when an incoming call is happening. I configured Routing Automation as shown below


And while validating the app with FDK validate it’s giving me this type of warning

[json-schema-faker] calling JsonSchemaFaker() is deprecated, call either .generate() or .resolve()

Can you suggest me where to use .generate() or .resolve() in the code. Will this affects the app to execute?

-Soujanya.

Just want to follow up on my earlier question, Can anyone help me with this? This is a high priority request :frowning_face:

Hi @soujanya,

Are you using a package called json-schema-faker ?

This seems to be a suggestion from the package itself.

Hi @saif,
I simply installed the app that is there in GitHub sample apps and while validating I found this error. In the project structure, i have actions.json with the below code snippet

{
"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"
}
}

In the server.js below is the code snippet

 validateVIPPhoneNumber: function (request) {
   console.log(request);
   let validVIPNumbers = ['+55528525', '+12543342'],
   response = validVIPNumbers.includes(request.input) ? 'valid' : 'invalid',
   data = {
    response,
    "app_variables": {}
   };
   console.log(data);
   return renderData(null, { data });
}

No where I’m using JsonSchemaFaker() in the code. I’m not getting when this method is getting invoked.

1 Like

Hi @soujanya

The deprecation warning is for modules used internally by the FDK. We are working to move forward from the deprecated code but like everything it will take some time. Good thing is there should be no effect whatsoever in the app code testing itself.

1 Like