Use the Mapbox Geocoder to find addresses and display the location on a map.
- Install ZAT or the Zendesk CLI: https://developer.zendesk.com/documentation/apps/zendesk-app-tools-zat/installing-and-using-zat/
- Clone this repository and
cd
into the directory - Run
zat server
to start a local server - Add your Mapbox access token available at https://account.mapbox.com/access-tokens/
- Open a ticket in Zendesk and append
?zat=true
to the URL - Click the app icon in the sidebar to open the app
- Type an address in the search box and hit 'Return' to open the map and display the location
- Click
⬅️ Add Map
to add the map to the ticket comment. The map will be added as an image attachment using Mapbox's Static API.
Note: The Geocoding and Static API requests will be charged to your Mapbox account so make sure you understand the pricing:
- https://docs.mapbox.com/accounts/guides/pricing/#search-related-apis
- https://docs.mapbox.com/api/maps/static-images/#static-images-api-pricing
When publishing your app, use zat package
to create a tepmorary zip file. Then, upload the zip file to the Zendesk Marketplace as a private app. Note, you will need to go to the Settings for the app to add your Mapbox access token.
Pull requests are welcome.
In some cases, you may find that the server is still running in the background after you stop the server. You can use the following commands to find the process ID and kill the process:
lsof -i :4567
kill -quit <PID>
The app will add additional images to the comments if you click ⬅️ Add Map
after multiple searches. You can delete the images from the comment before submitting the ticket.