Bug: Conversation Search API not returning expected data for boolean rules | Community
Skip to main content

Noticed an issue with the conversation search API, specifically on boolean fields when coupled with the != operator.

For example the below query (even when run from the “Try it” button on the docs page) returns the same exact response as when using the = operator. 
 

POST https://api.intercom.io/conversations/search

Body: {  

  "query": {    

    "operator": "AND",    

    "value": b{

      "field": "read",

      "operator": "!=",

      "value": "true"

    }]

  }

}

I tested with different value types (string, boolean), other boolean fields (ex: open), as well as with “false” values. The behavior is the same.

Please assist.

Hi ​@Bogdan D 
You mentioned that you attempted the same approach with false values. Does that mean you tried this:

 

 "value": u{

      "field": "read",

      "operator": "=",

      "value": "false"
}]

 instead of:
 

 "value": r{

      "field": "read",

      "operator": "!=",

      "value": "true"

    }]

to get different results?

When I used 'read = true' and 'read != true,' I got the same results. However, when I used 'read = false,' I got different results.


Hi Nurit, 

The = operator works as expected for both value: true or value: false.
The issue is with he != operator.

As you mentioned, you used “read = true” and “read != true”, and got the same results - that’s the problem!
I would expect “read = true” to give different results than “read != true”.
Essentially, “read = true” should give the same results as “read != false” and “read = false” same as “read != true” assuming all conversations have the “read” field set (not undefined).


@Bogdan D It’s Mat from the Support Engineering Team 😀

 

Please reach out to us via the chat in your Workspace. If it’s not working, it may be a bug that we need to address as soon as possible.

I’ve tested the query in my test Workspace and noticed it returns different responses.

That’s why we strongly recommend opening a chat with us so we can investigate further.


Reply