Explore recipe: Recording the time when a checkbox was checked

Return to top
Have more questions? Submit a request

8 Comments

  • Jed Hollander

    Does this formula work for any custom field? I guess the better question are timestamps saved for all custom fields?

     

    Thanks

    1
  • Chandra Robrock
    Community Moderator

    Hi Jed Hollander - While you won't see an attribute exclusive to the custom field change timestamp, you will be able to understand the exact timestamp in which a custom field was updated by using the Update - Timestamp. The timestamp shown within the Update - Timestamp attribute will be based on the exact data you're looking at in Explore. 

    For instance, in the formula provided in this recipe article, the Update - Timestamp attribute will only reflect ticket updates in which Checkbox_1 was selected.

    In terms of whether you'd be able to use this same formula for other custom fields, you should be able to use this for most (if not all) custom ticket field types. However, you'll likely need to change the formula based on the type of custom field you'd like to report on since not all custom field types would return an old/new field value of either 1 or 0. Instead, the custom field value might actually be text or a ticket tag.

    Additionally, in the case of a dropdown menu that has a lot of different options, this formula might be a better way to go so that you don't have to explicitly call out each individual dropdown menu option within your query.

    IF ([Changes - Field name]="Dropdown_1")
    AND
    ([Changes - Previous value]=NULL))
    AND
    ([Changes - New value]!=NULL)
    THEN
    [Update - Timestamp]
    ENDIF

    Hope that helps point you in the right direction!

    0
  • Cameron Christopher Dunn

    Chandra Robrock thanks for that response! I've been searching for the appropriate replacement for the Insights recipe Duration between two or more ticket events and this seems to be a piece of it.

    In the long run, I'm trying to report on the time between escalation and first resolution, and separately, the time to escalation.

    Escalation happens via a dropdown named "Escalate" in our instance, but I can't find an example of using a custom field for the dropdown (e.g. what to put where you have "Dropdown_1"). I've tried "Escalate" (the name of the field), "[Escalate]", and "custom_field_#####" (with the field's ID replacing #s) and they're all coming up empty. It could be that I've messed something else up, but could you verify which syntax is correct?

    Thank you!

    0
  • Chandra Robrock
    Community Moderator

    Cameron Christopher Dunn I just double checked in my own Zendesk instance and can confirm that you'll want to use: [Changes - Field name]="Escalate"

    If by chance you're using the exact formula I provided above, it appears I had accidentally left an extra parenthesis that isn't needed on Line 3, which would also cause a syntax error in Explore.

    It should be:

    IF ([Changes - Field name]="Dropdown_1")
    AND
    ([Changes - Previous value]=NULL)
    AND
    ([Changes - New value]!=NULL)
    THEN
    [Update - Timestamp]
    ENDIF

    Apologies if that might've been the thing tripping you up!

    0
  • Dave Dyson
    Zendesk Community Team

    Thanks Chandra Robrock!

    0
  • Cameron Christopher Dunn

    Thanks, Chandra! I had that right, and I caught those errant parenthesis, so it must be something else causing this particular query to come up empty, because I've built two others with this recipe and new custom fields and they're populating just fine.

    For those interested: we're trying to track new custom periods of a ticket's lifecycle, like "Time to Escalation" and "From First Escalated Response to First Resolution". I created triggers that check custom fields at the start of those periods, and triggers that uncheck at the end, and am now using this Explore recipe to report on those new KPIs!

    0
  • Charlie Smith

    I'm trying to do this in my query, but not having any luck. The field I am using is a drop down, so I'm not sure if I should be using something else aside from NULL. 

    0
  • Chandra Robrock
    Community Moderator

    Charlie Smith NULL should be correct, even for dropdown fields.

    I'm thinking 1, 5 and 10 might be the actual dropdown field values rather than the underlying ticket tag associated with those dropdown field values. You'll want to use the actual tag as the [Changes - New value] value instead.

    For example, if the underlying ticket tag for those dropdown values are nps_1, nps_5, and nps_10, the end result would look like this:

    IF ([Changes - Field name]="Nicereply CSAT")
    AND ([Changes - Previous value]=NULL)
    AND (([Changes - New value]="nps_1")
    OR ([Changes - New value]="nps_5")
    OR ([Changes - New value]="nps_10" ))
    THEN
    [Update - Timestamp]
    ENDIF

    0

Please sign in to leave a comment.

Powered by Zendesk