Update Organization from ZAF ticket app
I'm building a small utility ZAF app to allow an agent to update a custom org field so that the org doesn't need to be completely opened to edit by the agents.
There doesn't appear to be a reference it with client.set and when I tried using client.requests with a "PUT" option; it returns the the org object as if I had done a "GET" request. If I try using an authorization header in the options I get a 403 access forbidden.
So... is it possible to use the ZAF client to update an org from a ticket? Or is it necessary to build out an additional HTTP requests schema to do the update?
Also, is there documentation that lists all the methods and parameters available for the ZAF Client? I am only seeing it in pieces in the developer site.
thanks in advance for any input, code snippets, or direction in this project.
Hi Raven Agape,
If your app location is in the ticket sidebar, you can update organization fields as follows:
The API reference is comprehensive. You will need to go through ZAF Client API, Core Apps API, targeted product's API for 'All locations' and your app's specific location. You will also need this article from developer documentation.
All the best,
Worked like a charm! Thank you so much!
After deployment we realized that if the user using the app doesn't have permission to modify the org the app doesn't work. This was the point of the app, so that is a no go.
Any ideas how I can authenticate the app in a way it can modify the org no matter the users permissions?
Technically, you can overlap ZAF integration and authenticate using OAuth. You should be able to use OAuth flow to Zendesk Support like you would any third-party app. However, this is not good security practise. All requests will come from the admin who installed the app (and completed the OAuth flow) if I am not mistaken. I do not recommend it. Instead, you should review the user permissions.
Anyhow, if you choose to do it, Make sure you scope the OAuth token to organizations only.
"scope": "organizations:write read"
Iniciar sesión para dejar un comentario.