Custom filters help please!

Hi, I want to get items that are new, and items updated recently for external database sync.
For new items - add_time > XX should do?

{“glue”:“and”,“conditions”:[{“glue”:“and”,“conditions”: [{“object”:“organization”,“field_id”:“3997”,“operator”:">",“value”:“2018-06-25 12:00:00”}]},{“glue”:“or”,“conditions”:[]}]}

For items updated recently/not new; add_time < XX and update_time > add_time + 10 seconds would be good? But how to write it?

If a deal/people is updated does this propagate up to the Organization is now updated?

Hi @Fulliautomatix

The add_time and update_time can be written the exact same, but if you need items with update as quickly as +10 seconds, I would really recommend just using a Webhook instead as it’s easier and you won’t need to worry about hitting limits.

“If a deal/people is updated does this propagate up to the Organization is now updated?” No, an item is only updated if an aspect of it will be specifically updated, so changing details of a Deal wouldn’t affect the update time of the connected organization (unless the update was something that affects items downward like writing a note on a Deal).

Hi @David
Thanks. I see my filter can be written;
{“glue”:“and”,“conditions”:[{“glue”:“and”,“conditions”: [{“object”:“organization”,“field_id”:“3997”,“operator”:"<",“value”:“2018-06-25 12:00:00”},{“object”:“organization”,“field_id”:“3998”,“operator”:">",“value”:“2018-06-25 12:00:00”}]},{“glue”:“or”,“conditions”:[]}]}

Any tips on the PUT to write filter updates from vba?
I’m using;
strURL = strURL & “/filters/{25}?api_token=” & strToken

'Set filter
With CreateObject(“MSXML2.XMLHTTP”)
.Open “PUT”, strURL, False
.setRequestHeader “Content-Type”, “application/json”
.Send (strSql)
txt = .responseText
End With

{“status”:false,“error”:“Unknown method .”}