Is it possible to get usage data on macros, triggers, and automations? Follow

Question

Is it possible to get specific usage data on macros, triggers, and automations?

Answer

Disclaimer: This article is provided for instructional purposes only. Zendesk does not support or guarantee the code. Please post any issues you have in the comments section or try searching for a solution online.

Although it is not possible to pull this kind of usage data for a specific date, you can obtain usage data for macros, triggers and automations based on the last hour, 24 hours, 7 days or 30 days through the API. There two different types of API calls you can make to obtain this usage data.  The first type would be to make a filtered request for each. The following parameters are supported when filtering this information via the API:

  • usage_1h
  • usage_24h
  • usage_7d

Example:

https://yoursubdomain.zendesk.com/api/v2/macros.json?sort_by=usage_1h,usage_24h,usage_7d

The second option would be to make a sideload request, to obtain the usage data for each. Side loading gives you a option for tracking usage over a larger amount of time by allowing you to add the parameter of 30 days to the request. The following sideloading parameters are currently supported:

  • usage_1h
  • usage_24h
  • usage_7d
  • usage_30d 

Example:

https://yoursubdomain.zendesk.com/api/v2/macros.json?include=usage_1h,usage_24h,usage_7d
The API calls will yield all macros, triggers and automations in your account.  The usage will be displayed by the number of times that object was used during each parameter set.  For more information on using the API to track usage data please see our developer documentation on macros, triggers and automations.
Note: These API requests will only display personal macros for the user that is making the request. If you are looking to track the use of all personal macros, each user would have to make a separate API call for their own personal macros.

 

Have more questions? Submit a request

Please sign in to leave a comment.

Powered by Zendesk