I would like to know if according to some data extracted from the ticket it’s possible to run the custom application …
for example, if the ticket requester have some specifications then run the app, otherwise not run.
Are you looking to show different data in the app or try to skip any actions in the app based on some data? Or show the app only if some condition matches as you mentioned?
It’s not possible to load the app based on any set condition. The apps are loaded in an iframe inside the main product. So, only different content can be shown based on any condition from any of the data that the app can access.
What I trying to do is that the app is executed or not according to the data that I’m going to read from the properties of the ticket that the agent is opening.
At first I tried to hide it through a css property, but when the app reads the data and tries to hide the button with:
document.querySelector ("# sticky_right .ticket-actions .mkp_placeholder.btn").style.display = "none";
It returns undefined because as you say I am inside the iframe, I don’t know what else I can do. Thanks
@saenzjulian It is not possible to hide the app placeholder. Only the app content can be changed or hidden based on any values that are read from ticket properties or whatever data available to the app.
You could skip doing some actions in the app and show some dummy content when you need the app to be not executed. This is what is maximum possible.
I will take this up as a feature request to get it considered to be validated with the use case. If it’s okay, could you tell me the use case of this requirement? You can choose to avoid telling if it involves your business logic that cannot be shared publicly.
Thank you very much for your appreciation @Raviraj, The main idea was that according to a custom field that has been created by us (This custom field can only take Boolean values) we could put a section in the body of the ticket that will notify the agent that it is solving the ticket about the value of that field because it is of utmost importance in the company
Could you please explain to me what you mean by showing a dummy content or what suggestion can you give me?
@saenzjulian I hope, the picture shows a public note or ticket on the ticket details page. These public notes and tickets can only be created through API. The app cannot create these without APIs. Refer to the Conversation APIs to create a reply/note with the custom information.
The custom field value can be read from this Data Method. Based on the value, the app can then add a reply or public/private note with the custom information.