Explore recipe: Filtering queries by business hours

Return to top
Have more questions? Submit a request

7 Comments

  • James Molina

    This is great!  Can you explain how the formula would be updated if you had different business hours for Saturday and different for Sunday?

    0
  • Eugene Orman
    Zendesk Product Manager

    That's a good question, James. 

    You will need to add two more OR conditions. Here is a formula examle: 

    IF ((IN([Ticket created - Day of week],ARRAY("Monday", "Tuesday","Wednesday","Thursday","Friday"))
    AND IN([Ticket created - Hour],ARRAY("9", "10", "11", "12", "13", "14", "15", "16")))
    OR([Ticket created - Day of week]="Saturday" AND IN([Ticket created - Hour],ARRAY("9", "10", "11", "12", "13", "14", "15")))
    OR([Ticket created - Day of week]="Sunday" AND IN([Ticket created - Hour],ARRAY("10", "11", "12", "13", "14"))))
    THEN TRUE
    ELSE FALSE
    ENDIF

    To check if it returns reasonable results, you can run this query:

    0
  • Kristin Bouveng

    Hi,

    I have reports by hour on various datasets and metrics, but the query isn't displaying the hours in chronological order (see below screenshot).

    How can I change that? 

     

    0
  • Eugene Orman
    Zendesk Product Manager

    Kristin Bouveng, hours are normally sorted chronologically unless you have some Result manipulation applied in your query. Check if you have some sort of sorting enabled set in this query. If the issue will persist please reach out to our support team. 

    0
  • Lucas Cumming

    Hey Eugene, I am glad you've figured out how to report this for tickets. I am struggling to see if there is a way to do this for calls through Zendesk Talk. Have you figured out a way to do this? Either way, I appreciate it.

    0
  • Emma Löfström

    Hi Lucas, I managed to do it for Talk. 

     

    IF ([Call direction]="Inbound")
    AND (IN([Call - Day of week], ARRAY("Monday", "Tuesday", "Wednesday", "Thursday", "Friday")) AND IN([Call - Hour], ARRAY("9", "10", "11", "12", "13", "14")))
    THEN [Call ID]
    ELSE FALSE
    ENDIF
    0
  • Emma Löfström

    Hi again, One of our phone lines opens at 09:30. How do I adjust this?

    I have used following code which works works perfect, HOWEVER I am not able to set it for the line which opens at 09:30. I have tried to enter 9:30 instead in the code, but then the result will only contain calls from 10 and forward. I do not have to use [Calls - hour] of course, but I have not found another way to do it. Any suggestions?

    "IF ([Call direction]="Inbound")
    AND ([Call completion status]="Completed")
    AND (IN([Call - Day of week],ARRAY("Monday", "Tuesday","Wednesday","Thursday","Friday"))
    AND IN([Call - Hour],ARRAY("9", "10","11","12","13", "14")))
    THEN [Call ID]
    ELSE FALSE
    ENDIF"

     

    0

Please sign in to leave a comment.

Powered by Zendesk