Skip to main content

Intercom conversation search API is not returning the expected data


We are facing some trouble as the Intercom Conversation search API is not returning the expected data.

 

Here is an example,

 

If we fetch the conversation via API, its being returned as expected

 

 

➜ ~ curl https://api.intercom.io/conversations/38016602896875 \

-H 'Authorization:Bearer XXXX=' \

-H 'Accept:application/json'

{

"type": "conversation",

"id": "38016602896875",

"created_at": 1593990326,

"updated_at": 1594391137,

......

}

 

 

But now if we try to get this conversation using the updated_at field, neither of the following two requests are returning any data:

 

 

➜ ~ curl -X POST --data '{"query":{"operator":"AND","value":[{"field":"updated_at","operator":">","value":1594391137},{"field":"updated_at","operator":"<","value":1594391137}]}}' -H 'Authorization: Bearer XXXX=' -H 'Accept: application/json' -H 'Intercom-Version: 2.0' -H 'Content-Type: application/json' -A 'Jersey/2.25.1' 'https://api.intercom.io/conversations/search'

{

"type": "conversation.list",

"pages": {

"type": "pages",

"page": 1,

"per_page": 150,

"total_pages": 0

},

"total_count": 0,

"conversations": []

}%

➜ ~ curl -X POST --data '{"query":{"operator":"AND","value":[{"field":"updated_at","operator":">","value":1594391136},{"field":"updated_at","operator":"<","value":1594391138}]}}' -H 'Authorization: Bearer XXXX=' -H 'Accept: application/json' -H 'Intercom-Version: 2.0' -H 'Content-Type: application/json' -A 'Jersey/2.25.1' 'https://api.intercom.io/conversations/search'

 

{

"type": "conversation.list",

"pages": {

"type": "pages",

"page": 1,

"per_page": 150,

"total_pages": 0

},

"total_count": 0,

"conversations": []

}%

 

Can we know what's happening here?

4 replies

Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • August 25, 2020

Hey there @fivetran d12​, can you let me know when you made these calls to our API (date and time) and when the conversation was updated, please?


Forum|alt.badge.img+1
  • Active User
  • 19 replies
  • October 12, 2020

@eric f11​ Hello, looks like I'm experiencing the same issue. Sorry for duplicate https://forum.intercom.com/s/question/0D52G00004ZkmekSAB/search-by-date-field-return-wrong-items-eg-contactssearch-by-createdat/p>

I'm willing to share my details if it could help. I can delete my question if this one is more convenient to use for further discussion


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • October 12, 2020

Hey @misha​, I'd suggest starting a new thread for this and giving as many details as possible, including the exact call you made (but remove any information that would be classed as PII for a customer!)

 

That'd be the best course of action here!


Forum|alt.badge.img+1
  • Active User
  • 19 replies
  • October 12, 2020

Okay, let’s continue here https://forum.intercom.com/s/question/0D52G00004ZkmekSAB/search-by-date-field-return-wrong-items-eg-contactssearch-by-createdat then. There are postman screenshots with exact calls. Please let me know if you need more details


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings