Freshdesk app capabilities

Hi, dev community,
I gathered a few questions about random capabilities of the custom Freshdesk app that I wasn’t able to find answers for, so I’m gonna post them here. Let me know if there is a better way of constructing such questions!

  1. Is the maximum height of app is 700px as per client.instance.resize() documentation?
    This one bothers me because seems like in most cases on Modals and Dialogs there is more space for my app to occupy but the visual part of my app is being cut off (as per the screenshot below)

  1. What should happen upon clicking ticket_top_navigation icon on ticket details page?
    My assumption is that this click should activate the application inside a Modal, but nothing happens for me (video attached below)
    P.S. uppon every icon click app.activated event is firing but nothing is happening
    P.S. no unusual errors in console after clicking on icon

top_nav_req

  1. Is there any difference between apps that can be run from comments section on the ticket details page (ticket_attachment and ticket_conversation_editor) and other apps? Are there other capabilities of applications in these locations?
    We have a potential use case of generating some report files and attaching them to the comment section immediately after that. Is that possible?
  2. Can the application name be renamed at a later date after running fdk create ... command?
    Can apps have different names? (i.e. ticket_sidebar has one name while full_page_app has another one?

Let me know if I am missing some answers to these questions in the documentation!
I really appreciate any help you can provide.
Vitalii!

Hi @Vitalii_Sukhostavsky ,

Good day!

Is the maximum height of app is 700px as per client.instance.resize() documentation?

If you resizing an instance manually via client.instance.resize - yes, the maximum height that can be scaled is 700px.

What should happen upon clicking ticket_top_navigation icon on ticket details page?

In case of ticket_top_navigation - When an agent clicks the app icon app.activated() will be triggered.

Can we open a modal on this trigger? - YES

Code snippet for your reference

var client;

init();

async function init() {
  client = await app.initialized();
  client.events.on('app.activated', renderText);
}

async function renderText() {
  console.log('app activated fired')
  try {
    // app.js
    await client.interface.trigger("showModal", {
      title: "Sample Modal",
      template: "template.html"
    });
  } catch (error) {
    // failure operation
    console.error(error);
  }
}

Make sure you’ve placed template.html in right location (/app/template.html)

Is there any difference between apps that can be run from comments section on the ticket details page (ticket_attachment and ticket_conversation_editor ) and other apps?

I don’t think so, it should work the same way as others.

  1. We have a potential use case of generating some report files and attaching them to the comment section immediately after that. Is that possible?

If I’m not wrong, you’re looking to create a conversation in the ticket with attachments. Check if the following API helps - ref

curl -v -u yourapikey:X -F "attachments[]=@/path/to/attachment1.txt" -F "body=this is a sample reply" -X POST 'https://domain.freshdesk.com/api/v2/tickets/27/reply'

Can the application name be renamed at a later date after running fdk create ... command?

Yes, just rename your folder & fdk pack will create dist with the same name.

  1. Can apps have different names? (i.e. ticket_sidebar has one name while full_page_app has another one?

If you’ve a ticket_sidebar app & full-page app (two different apps) - yes

Hope this helps. Thanks

1 Like

Hi @mariappan,
Thanks for your answers, they are really helpful!
I have some follow-up questions regarding some of this topics:

If you resizing an instance manually via client.instance.resize - yes, the maximum height that can be scaled is 700px.

Is there any other way to extend this 700px limit except for instance.resize API?

In case of ticket_top_navigation - When an agent clicks the app icon app.activated() will be triggered.

So, this is desired behavior that upon clicking ticket_top_navigation app icon the only thing that happens is app.activated() is called, am I right?

If I’m not wrong, you’re looking to create a conversation in the ticket with attachments. Check if the following API helps - ref

Is this an API that can be used to manipulate Freshdesk entities from server side? So, looks like we are able to manipulate ticket or contact instances from server side applications using just API Key from out account, right?

If you’ve a ticket_sidebar app & full-page app (two different apps) - yes

But in this case we will need to have separate React applications and deploy them to the marketplace separately?
Is there any way to achieve that using one React app?

Hi @Vitalii_Sukhostavsky ,

Is there any other way to extend this 700px limit except for instance.resize API?

Not that I know of

So, this is desired behavior that upon clicking ticket_top_navigation app icon the only thing that happens is app.activated() is called, am I right?

When the app icon is clicked app.activated() method is triggered and the corresponding callback is executed. You can inject your logics in the callback & even chain methods from there if you wish to split those modular.

Is this an API that can be used to manipulate Freshdesk entities from server side?

You can simply use our Request method to make API calls from client side. Check the linked doc for more info.

Is there any way to achieve that using one React app?

Yes, you can have multiple placeholders for a single app. But, I don’t think you can name those differently when it’s part of a single app.

Hope this helps.

Hi @Vitalii_Sukhostavsky,

Is there any other way to extend this 700px limit except for the instance.resize API?

Expanding the app beyond this height and the default width is impossible. If you want more real estate for your app, the full-page app placeholder can be used to get the entire page for the app except for the header and left sidebar.

Hi @Raviraj,
Thanks for your response, that’s what I was assuming
Have only one last question regarding sizing of applications:

Are modals restricted to these dimensions as well?

Here are 2 screenshots!
The first one is a screenshot of some other application from marketplace and I see that this application is using whole modal dimensions. The same behavior can be seen opening default Time Logs widget on ticket details page!

The second screenshot is my local application which appears to have dimensions 520 x 919px. Whatever I tried to do I wasn’t able to make my application bigger and utilize all space of modal (which seems to be unused either way)

So my question is: how can my app achieve the same modal dimensions as others?


@Vitalii_Sukhostavsky I sense that both are the same Show Modal functionality from the Interface Methods feature.

The modal size is the default; it takes the complete height with the whitespace with some margin. The app cannot define the height of the modal. It takes the space required, and a scroll bar appears if the content is longer than the viewport.

I don’t see a scrollbar in your app on the right side. The content to be shown could be ended there. Maybe you can add more HTML elements to the modal that would require the complete viewport to test if the app takes the complete real estate.

Hey @Raviraj,
there is no scrollbar on my screenshot only because my Mac settings hide scrollbar when it is not in use. On this example I provided there are at least a dozen DOM element that are cut off with this huge bottom margin (you can even spot the last ‘Test’ DOM element is cut off right in the middle)

Is there any way to reduce these huge bottom and side margins?

1 Like

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