Recent searches


No recent searches

ZIS logging, playground and custom field values



Posted Dec 30, 2024

Greetings!
I have been working to understand ZIS and implement a couple of bundles and I have a few questions I can't find any references to or the references are not working for me.

1. How can the value of a variable be exposed during debugging? I have seen references to zis:common:log but that doesn't work when I try it. Is there something that can be put in a "Type": "Succeed" or "Type": "Failed" action? Or what is the best practice here? Can you give an example? I am aware of the ZIS Playground and of the Integration Log, but often what I am trying to track is not just showing up there.

2. How can the value of a custom field be accessed, i.e. what is the syntax? I worked with a couple of references and tried this (I am working with the ticket created event):
"Parameters": {
      "expr": ".ticket.custom_fields[] | select(.id == 17336016451101) | .value ",
      "data.$": “$.input.ticket_event”
    },
but I get no value 

I have also tried variations on .ticket.custom_field:custom_field_17336016451101 or .ticket.custom_field.custom_field_17336016451101 with no luck either.

Can you provide an example of best practice here?

3. Can you give an example of how to iterate through a json response to a ticket query with multiple tickets? I have successully run queries of the form "path.$": "/api/v2/search.json?query…. but am having difficulty iterating and parsing through the returned tickets (particularly in reference to #2)

thank you for any insight and examples!




 


0

1

1 comment

Hi raven.agape,

Someone from Zendesk may be able to provide additional information, but maybe I can help a bit first.

1. What I have done so far for debugging is use a combination of the Catch blocks described here, and also pushing data to a third-party service like requestbin.  Some additional information may be logged to the integration log https://{account}.zendesk.com/admin/apps-integrations/integrations/logs, but like you mentioned it doesn't always show what we need to know.

2. Based on the documentation for the ticket created event here, it looks like custom fields may not be available.  In that case, you could create a separate action which makes an API request to the tickets endpoint to retrieve the data.

3.  ZIS uses jq to help parse data, and they provide a cheat sheet here for common actions.  You can also check the jq documentation for more information.  If you're still not able to get it to work, please share what you have tried so far and we can try to make suggestions to get the right answer.

2


Please sign in to leave a comment.

Didn't find what you're looking for?

New post