What are Cloze API Filters?
Note: This feature is currently in beta.
There are two options for filtering and both have their own advantages:
- Cloze API Filters
- Zapier Filters
Please see below for details regarding both options.
Cloze API Filters is a feature of the Cloze REST Developer APIs.
API Filters are applied to Web Hooks deliverered by Cloze and are described under the API Hooks Subscribe section of our API documentation. Please contact support@cloze.com for access to Cloze REST Developer APIs.
Zapier triggers from Cloze for person, company and project changes are implemented as Cloze API Web Hooks. As an API Client of Cloze through Zapier, Zap developer's can leverage the Cloze API Web Hook filtering mechanisms to constrain the data delivered to Zapier.
Functionally this is the same as Zapier filter steps, but the major difference is that since Cloze API filters are performed within the Cloze application, no data is delivered to Zapier unless the Cloze API filter requirements are satisfied. As hooks will only be called when necessary, network utilization and risk of rate-limiting by Zapier is reduced.
Cloze API filters are described in terms of the lower-level API specifications, and as such require knowledge of the API structures.
For Zap developers who do not wish to get involved at this level, Zapier filter steps may be used.
Cloze Filters Approach
Filters are specified as a JSON array that express one or more rules, where each rule (filter) specifies the set of data properties that must bet met. When any rule matches, Cloze will trigger the data. Each filter can match against the actual record component and on the record's changes information. For example, to filter on any ("*" expression) stage changes of a person record within the Client segment enter:
[{"person" : {"segment" : "Client"} ,"changes" : {"stage":{"after":"*"} } }]
Tip: When creating these filters you can use Cloze to see what Custom Fields and values are available for filtering against.
Here are some examples you can try in Zapier:
Project/Deal/Case Filter Examples
Trigger when a Deal Next Step changes
If you wanted to trigger a Zap each time a Deal Next Step changes you would enter into Zapier field:
{"project" : {"segment" : "Deal"} ,"changes" : {"step":{"after":"*"} } }
Then when the Next Step changes on any Deal the Zap will trigger:
Here are more examples you can use:
- Trigger when a Deal is Won:
{"project" : {"segment" : "Deal"} ,"changes" : {"stage":{"after":"Won"} } } - Trigger when a custom field Forecast changes to Commit:
{ "changes" : { "Forecast" : {"after":"Commit"} } } - Trigger when a the Number of Seats on a Concierge Service Deal changes:
{"project" : {"segment" : "Deal", "customFields":[{"id":"Concierge Service","value":"Yes"}]} ,"changes" : {"Number of Seats":{"after":"*"} } }
People Filter Examples
Trigger when a Customer segment person enters Active stage.
If you wanted to trigger a Zap each time a Customer is classified with the Active Stage you would enter into Zapier field:
{"person" : {"segment" : "Customer"} ,"changes" : {"stage":{"after":"Active"} } }
Here are more examples you can use:
- Trigger when the next step of a Potential Partner is Final Agreement:
{"person" : {"segment" : "Partner", "stage" : "Potential"} ,"changes" : {"step":{"after":"Final Agreement"} } } - Trigger when a Potential Partner in Marketing becomes a Director:
{"person" : {"segment" : "Partner", "stage" : "Potential", "customFields":[{"id":"Department","value":"Marketing"}]} ,"changes" : {"Role":{"after":"Director"} } }
Zapier Filter Step Approach
When Cloze triggers fire they provide an additional changes field that informs the Zap developer of what fields in Cloze changed to cause the trigger to fire. This in conjunction with other field values may be used to develop sophisticated Zapier filters that express, say, occurance of a specific stage change.