Skip to main content

url = "https://api.intercom.io/conversations/search"

headers = {

'Accept': 'application/json',

'Authorization': 'Bearer auth-token',

"Intercom-Version": "2.9",

"Content-Type": "application/json"

}

params = {

  "query": { "operator": "AND", "value": { "field": "team_assignee_id", "operator": "!=", "value": None}]}

}

response = requests.post(url, headers=headers, json=params)

 

I want to get all assigned conversation and I have only one conversation and it’s team_assignee_id value is null. This query should return an empty list, but it is returning that conversation. What is the correct setup to get only assigned conversations? Also, for whatever reason, the equal(“=”) operator returns the same result. 

"query": {"field": "team_assignee_id","operator": "=","value": None}
This query using equals and not equals return an empty list.

I figured it out. You gotta use an empty string instead of None. This returns all the assigned conversations. 
"query": { "operator": "AND", "value": { "field": "team_assignee_id", "operator": "!=", "value": ''}]}


Reply