How to select questions using a criteria using API

  • 16 March 2021
  • 3 replies

Userlevel 2
  • inSpires others
  • 29 replies posted

We are trying to develop a workflow that will notifiy a specific group when topics have no replies after a certain time. In the community startup, it is important that we get to these questions fast to ensure customers keep coming back.

However, the API does not seem to allow us to selectively return questions based on a criteria - or at least, its not documented. Is there a generic syntax to the API that will allow us to select questions based on criteria input?

Here is the comment from our developer - it seems like there is no choice but to get ALL questions in the community to evaluate which ones to take action on. 

It seems like I have to always loop through all the questions in the given category – the result of questions is listed in last activity time descending. If new question is created or old question gets replied, the sequence will be changed, so it would be hard to get the pattern. This means the more questions get created, the longer this workflow may have to run.

3 replies

Userlevel 2

@tom.shaddock - any thoughts on this?

Userlevel 7
Badge +1

Hi @dandre, sorry to see that your question has remained unanswered for so long. Unfortunately me and Tom had quite a busy week, so we are trying to catch up with this as soon as possible. I’m not able to answer this, but I assure you I will check with Tom and other colleagues to help you further with this. Quite ironically, I could have used such a notification in this case as well. :(

Userlevel 2
Badge +1

I’m trying to code a very similar thing, so I’m interested in the answer! In my case, I’m trying to code a script which does the following:

  1. Query questions
  2. Narrow down to questions that have remained unanswered for over 24 hours
  3. Identify the author/user role of the OP
  4. Notify our team externally if the criteria is met

Would love to be able to narrow down by time frame if possible.