Vor Kurzem aufgerufene Suchen
Keine vor kurzem aufgerufene Suchen
Questions regarding response caching and app deployment (client-side app)
Gepostet 13. Okt. 2023
Hello Zendesk Community!
We are currently building a relatively simple client-side app and have run into some questions which we hope you could help answer.
The app we are building runs client-side in the ticket sidebar and is built using the ZAF. When the app loads, or when a user presses a button, a network request is sent out to our server. We perform a calculation based on the data provided, send the response back in JSON format, and render it back in the sidebar.
The questions we have are:
- How do we store response data from endpoint? The calculation we are performing is rather expensive, and as such, we would like to used cached responses on subsequent app loads. We had thought of a couple of approaches, but so far none are ideal. Storing the responses in local storage will only mean that responses are cached on a per-agent basis. If another agent loads a ticket, or the agent uses another browser, the calculation will be made again, which is not ideal. Setting cache: true when using client.request(...) method in the ZAF only seems to work with view responses. We were not able to get a cached response this way, but maybe we are doing something wrong. Using custom objects is a no-go due to limits on the field size. We could just cache responses on the server, although this will mean storing ticket information off-Zendesk, which does not seem like the right approach.
- How do we determine who can access the app? We want to allow requests to our backend only from the app. If the user were to rip out the request URL and tried to call it from somewhere else, the request should fail. Simplest way to do this would be to check the subdomain from which the request came from against the list of subdomains that have installed the app. However we were not able to find any docs for endpoints that would allow us to see who has installed the app so we can dynamically update the list of allowed subdomains on our end. What is the correct approach here?
Appreciate the help!
0
0
0 Kommentare
Melden Sie sich an, um einen Kommentar zu hinterlassen.