Testing a Zendesk app that uses app requirements or secure requests

You should normally use the Zendesk Apps Tools (ZAT) to run and test your apps locally in Zendesk Support. The ZAT server saves you the hassle of packaging and uploading the app every time you want to test a change.

There are however two cases where you might want to install the app in Zendesk Support as a private app instead of using the ZAT server for testing:

  1. You’re using apps requirements to create a Zendesk Support resource such as a custom ticket field or a target for your app. Apps requirements are generated when the app is installed so the app can’t be tested locally with the ZAT server.

  2. You’re using secure settings for secure requests . The app has to be installed for secure requests to travel through the Zendesk Support proxy. The zat server doesn’t know how to handle a secure request.

Fortunately, there's a way to push changes to a private app without having to re-package, re-upload, and re-install each time you make a change. This article shows you how.

Install your app as a private app

  1. Install the ZAT tools on your system if you haven't done so yet. See Installing and using the Zendesk apps tools .

  2. Use the zat package command in the ZAT tools to package your app files. See Packaging your app for upload to Zendesk Support .

  3. Upload your app to Zendesk Support as described in Uploading and installing your private app in Zendesk Support .

Push changes to the installed app

After making changes to your app, run the zat update command on the command line to push updates to a private instance of your app in Zendesk Support. Here’s how:

  1. Sign in to Zendesk Support as an admin and open the following page:

    https://your_subdomain.zendesk.com/api/v2/apps/installations.json

    Replace your_subdomain in the URL with your own.

  2. Find your app and copy the app_id .

  3. Add a file named .zat to the root directory of your app.

    Creating files with a leading period can be a challenge in both Mac OSX and Windows.

    On a Mac, you can use Terminal. Navigate to the app's root directory and run the following command:

    $ touch .zat

    In Windows, create the file in NotePad with File > Save As .

  4. Add the following code to the file:

    {  "subdomain": "your_subdomain",  "username": "your_username",  "app_id": 0000}

    Replace the property values with your own values.

  5. Run zat update on the command line and enter your Zendesk Support account password.

  6. Refresh your apps in Zendesk Support. The app is updated.

  7. Run your tests on the app.