Freshsales Suite & Classic SDK App domain issue with Request Templates

While I am trying to migrarte the App from 2.2 version to 2.3 version with freshsales classic and suite facing an issue with request templates invoking process with domain values.

For example, my domain in freshsales suite was kookoo.freshworks.com and it is allowing only myfreshworks.com only from settings page and not able to invoke the request template without the settings doamin parameters.

I just want to pass the hostname instead of settings with context data on calling invokeTemplate method and throwing as pass valid fqdn error.

What if the customers are using any custom domain for freshsales account ?

Can anyone please suggest and help me to resolve the issue.

Hey @ozonetel,

Thanks for reporting this.

Can you please share the error and also the request.json?

Hey @zach_jones_noel,

I have freshsales suite account and domain was kookoo.freshworks.com instead of kookoo.myfreshworks.com. So, i am uable to use the request.json with dynamic domain names from my account.

Please help us with resolve the issue.

Example request.json

{
“searchModule”: {
“schema”: {
“method”: “POST”,
“host”: “<%= iparam.domain %>.myfreshworks.com”,
“path”: “crm/sales/api/filtered_search/<%= context.module %>”,
“headers”: {
“Authorization”: “Token token=<%= encode(iparam.api_key) %>”,
“Content-Type”: “application/json”
}
}
}
}

Thanks @ozonetel,

Does the API work with freshworks.com domain or myfreshworks.com domain?

It works with freshworks.com domain for my account. It works based on the customer domains. But I can’t be able to fetch the complete domain from the settings.

Just getting the subdomain name only.

Can you share iparams.json, @ozonetel?

Hi @zach_jones_noel,

Below is the iparams.json i am using.

iparams.json:

{
“dynamic_location”: {
“display_name”: “CA - Allow agent location”,
“description”: “Allows agents to select cloudagent location before login”,
“type”: “checkbox”,
“default_value”: false,
“events”: [
{
“change”: “dynamicLocation”
}
]
},
“location”: {
“display_name”: “CA - Location”,
“description”: “CloudAgent location for agent”,
“type”: “dropdown”,
“options”: [
“INDIA”,
“USA”
],
“required”: true,
“default_value”: “INDIA”
},
“agent_name”: {
“display_name”: “CA - SSO Agent”,
“description”: “Fetch cloudagent AgentId from FreshSales user email”,
“type”: “checkbox”,
“default_value”: false
},
“click2call”: {
“display_name”: “Click2Call”,
“description”: “Allow Agent to make Click2Call from FreshSales”,
“type”: “checkbox”,
“default_value”: true,
“events”: [
{
“change”: “click2call”
}
]
},
“search_at”: {
“display_name”: “Search At Module”,
“description”: “Performs search with CallerId on the selected order”,
“type”: “multiselect”,
“options”: [
“lead”,
“contact”,
“sales_account”
],
“required”: true,
“default_value”: [“contact”],
“events”: [{
“change”: “searchAt”
}]
},
“search_on”: {
“display_name”: “Search on Fields”,
“description”: “Performs search at modules with CallerId”,
“type”: “multiselect”,
“options”: [
“mobile_number”,
“work_number”,
“phone”
],
“required”: true,
“default_value”: [
“mobile_number”
]
},
“create_on”: {
“display_name”: “Create on Module”,
“description”: “Create a record on lead, contact or account, if not found.”,
“type”: “dropdown”,
“options”: [
“lead”,
“contact”,
“sales_account”
],
“required”: true,
“default_value”: “contact”
},
“call_log_creation”: {
“display_name”: “Create/Update Call Log”,
“description”: “Allow Call Log creation or updation of call details”,
“type”: “multiselect”,
“options”: [
“ALL”,
“NONE”,
“INBOUND”,
“MANUAL”,
“PREVIEW”,
“PROGRESSIVE”,
“PREDICTIVE”
],
“required”: true,
“default_value”: [
“ALL”
],
“events”: [
{
“change”: “createCallLog”
}
]
},
“show_call_log”: {
“display_name”: “Open Call Log on create/update”,
“description”: “Allow Call Log to open on creation or updation”,
“type”: “checkbox”,
“default_value”: true
},
“domain”: {
“display_name”: “Domain”,
“description”: “FreshSales Domain”,
“type”: “domain”,
“required”: true,
“type_attributes”: {
“product”: “FreshSales”
}
},
“api_key”: {
“display_name”: “API Key”,
“description”: “FreshSales API Key”,
“type”: “api_key”,
“required”: true,
“secure”: true,
“type_attributes”: {
“product”: “FreshSales”
}
}
}

Hey @ozonetel, can you confirm if it works when you change the product as freshworks_crm?

@zach_jones_noel,

Still facing the same issue. Attaching the screenshot for reference.
Please help me to close this issue ASAP.

iparams.json:

{
“dynamic_location”: {
“display_name”: “CA - Allow agent location”,
“description”: “Allows agents to select cloudagent location before login”,
“type”: “checkbox”,
“default_value”: false,
“events”: [
{
“change”: “dynamicLocation”
}
]
},
“location”: {
“display_name”: “CA - Location”,
“description”: “CloudAgent location for agent”,
“type”: “dropdown”,
“options”: [
“INDIA”,
“USA”
],
“required”: true,
“default_value”: “INDIA”
},
“agent_name”: {
“display_name”: “CA - SSO Agent”,
“description”: “Fetch cloudagent AgentId from FreshSales user email”,
“type”: “checkbox”,
“default_value”: false
},
“click2call”: {
“display_name”: “Click2Call”,
“description”: “Allow Agent to make Click2Call from FreshSales”,
“type”: “checkbox”,
“default_value”: true,
“events”: [
{
“change”: “click2call”
}
]
},
“search_at”: {
“display_name”: “Search At Module”,
“description”: “Performs search with CallerId on the selected order”,
“type”: “multiselect”,
“options”: [
“lead”,
“contact”,
“sales_account”
],
“required”: true,
“default_value”: [“contact”],
“events”: [{
“change”: “searchAt”
}]
},
“search_on”: {
“display_name”: “Search on Fields”,
“description”: “Performs search at modules with CallerId”,
“type”: “multiselect”,
“options”: [
“mobile_number”,
“work_number”,
“phone”
],
“required”: true,
“default_value”: [
“mobile_number”
]
},
“create_on”: {
“display_name”: “Create on Module”,
“description”: “Create a record on lead, contact or account, if not found.”,
“type”: “dropdown”,
“options”: [
“lead”,
“contact”,
“sales_account”
],
“required”: true,
“default_value”: “contact”
},
“call_log_creation”: {
“display_name”: “Create/Update Call Log”,
“description”: “Allow Call Log creation or updation of call details”,
“type”: “multiselect”,
“options”: [
“ALL”,
“NONE”,
“INBOUND”,
“MANUAL”,
“PREVIEW”,
“PROGRESSIVE”,
“PREDICTIVE”
],
“required”: true,
“default_value”: [
“ALL”
],
“events”: [
{
“change”: “createCallLog”
}
]
},
“show_call_log”: {
“display_name”: “Open Call Log on create/update”,
“description”: “Allow Call Log to open on creation or updation”,
“type”: “checkbox”,
“default_value”: true
},
“domain”: {
“display_name”: “Domain”,
“description”: “FreshSales Domain”,
“type”: “domain”,
“required”: true,
“type_attributes”: {
“product”: “freshworks_crm”
}
},
“api_key”: {
“display_name”: “API Key”,
“description”: “FreshSales API Key”,
“type”: “api_key”,
“required”: true,
“secure”: true,
“type_attributes”: {
“product”: “freshworks_crm”
}
}
}

manifest.json:

{
“platform-version”: “2.3”,
“product”: {
“freshworks_crm”: {
“location”: {
“left_nav_cti”: {
“url”: “left_nav_cti.html”,
“icon”: “styles/images/ozonetel.svg”
}
},
“requests”: {
“searchModule”: {},
“createCall”: {},
“createNote”: {},
“updateNote”: {}
}
}
},
“engines”: {
“node”: “18.15.0”,
“fdk”: “9.0.4”
}
}

Hey @ozonetel,
When publishing the app can you try with - data-bind property to auto-complete the product domain instead of using domain type?

"domain": {
    "display_name": "Product Domain",
    "description": "Please enter your account’s Domain",
    "type": "text",
    "data-bind": "product.domain",
    "required": true
  }

https://freshworks.dev/docs/app-sdk/v2.3/freshdesk/app-settings/installation-settings-page/

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.