We previously integrated Freshdesk with Dialpad telephony using Node.js version 14 and platform version 2.0 using vue.js, and successfully went live. However, the previous version has been deprecated, so we need to upgrade to the latest version 2.3 and Node.js 18.
After upgrading, we attempted to use invokeTemplate in the frontend app.js, but we encountered an issue when trying to save the index.html file with the latest CLI using src= {{{appclient}}}. Each time we changed the CLI and ran fdk run, the index.html file would automatically revert to its previous state, replacing our changes.
We require your assistance on how we can save the index.html file with new fresdhesk CLI .
Our aim is to make use of invokeTemplate from client side, but it doesn’t happen, however it works fine at server side by using $request.invokeTemplate
Note: We observed that this functionality is working fine with normal apps, but not with vue app.
Replace /index.html with the path to your new appIndex.html file.
Restart the FDK using fdk run to apply the changes.
With this approach, the new HTML file should maintain your changes, and the updated CLI src should work as expected. Make sure to follow the syntax for using {{{appclient}}} correctly in the new appIndex.html file.
Please let me know if this solution works for you, or if you need further assistance.
Hey @Bharath_Raghuraja,
Can you please help me understand where the below API is being invoke? I see the request template is using both context and iparams for domain and API key.
We are currently using freshdesk_vue_app. Previously, we were using fdk 8 and the client.request.get() method on both the client and server sides.
Recently, we upgraded to FDK 9 and started using $request.invokeTemplate on the server side, which is working well. However, on the client side, when we use client.request.invokeTemplate(), it throws a “substituting template error”.
Here is the code snippet we are using on the client side:
We are using both context and iparams for the domain and API key in the server.js file, and this is working fine. However, it is not working on the client side (app.js).
Hi @zach_jones_noel,
We changed the template with domain from Iparams but still the same error appears.
Also We’re unable to configure the domain in Iparams. Our client uses multiple domains for a single app, so the domain name needs to be dynamic based on the client.
Even after hardcoding the domain and API key in the request.js scheme, we’re still encountering the same error message “error while substituting Template.”
Could you please assist in resolving this issue promptly? Our application is already live, and this delay is impacting our production users.
Note:
We are using the freshdesk vue app. This issue only occurred in vue App.
We are eagerly awaiting your response. Our project has gone live, and we are encountering an issue. Could you please prioritize this and assist us in resolving it?
@Bharath_Raghuraja Have you registered this request in the manifest file? Also, please check your local store folder for the ‘freshdesk_apiKey’ key name.
@Gopi,
Yes, We have registered the request in the manifest file. we pass the valid “freshdesk_apiKey” to the request. and this API working in server.js but not working in frontend file. app.js.
@Bharath_Raghuraja To ensure the proper functioning of our system, it is essential to register the function used in the frontend file within the server.js file. Kindly follow the instructions below:
Add the function registration in the “functions” section as follows:
“functions”: {
“getContactList”: {
“timeout”: 20
},
},
Include the corresponding request in the “requests” section:
“requests”: {
“getContactList”: {},
}
This step is crucial for seamless communication between the frontend and server. Please make sure to complete this registration process promptly. If you encounter any issues or have further questions, feel free to reach out.
It seems like you are encountering issues specifically while working with the Vue.js app. To better understand the problem and find a solution, please provide more details about the error message you are encountering, and any console logs or error logs related to the issue.
Additionally, make sure that you have installed all the required dependencies for your Vue.js app and that your app’s setup is properly configured according to Freshworks’ guidelines.
If you could share a minimal code example or repository showcasing the problem, it would be helpful for us to assist you further.