Contents

Rule

A single filter rule for a dynamic location group.

Declaration

object Rule

Properties

NameTypeDescription
field Requiredstring

The location attribute to filter on. Values: adminArea (state or province name, for example, "California"), locality (city or locality, formatted as countryOrRegion|adminArea|locality, for example, "US|New York|Brooklyn"), postalCode (postal code, for example, "94107"), locationId (location ID, for example, "7205759403792794"). Cannot be null.

operator Requiredstring

Comparison operator to apply against field. Cannot be null.

value RequiredRule.Value

The value to match against. Pass a string for EQUALS and NOT_EQUALS. Pass an array of strings for IN and NOT_IN.

Discussion

The Rule object defines a filter for a DYNAMIC LocationGroup, specifying how the system selects locations at query time. Rules can mix different field values within the same group, and the system re-evaluates location membership whenever rules change, setting LocationGroup.systemStatus to PENDING until evaluation completes.

Example

{
  "field": "adminArea",
  "operator": "IN",
  "value": ["California", "New York"]
}

Topics

Dictionaries

See Also