Issue searching catalog items by multiple custom attribute filters

I’m trying to search for items / variations on my catalog using a set of custom attribute filters I defined (width, depth, height) and unfortunately it’s not working as expected.

It works well when I only specify a single custom attribute on my query, but when I start combining them together, I noticed that the response return items / variations that satisfies one of the filters (the first one).

On the other other, if I combine a number_filter (ex: width) with a selection_uids_filters (ex: color) on the same query, then I do get results that only satisfy both parameters.

Does that mean I can only use one type of custom_atribute_filter at a time?

:wave: Would you mind providing the request that you’re sending to Square? :slightly_smiling_face:

Here you go:

curl https://connect.squareup.com/v2/catalog/search-catalog-items \
  -X POST \
  -H 'Square-Version: 2022-01-20' \
  -H 'Authorization: Bearer access-token' \
  -H 'Content-Type: application/json' \
  -d '{
    "sort_order": "ASC",
    "custom_attribute_filters": [
      {
        "custom_attribute_definition_id": "JVFJ224HWFIHL42VIXTZVNBX", // width filter
        "number_filter": {
          "max": "50",
          "min": "0"
        }
      },
      {
        "custom_attribute_definition_id": "ZLGISUSJZKIKMKGMSST7OXBN", // depth filter
        "number_filter": {
          "max": "20",
          "min": "0"
        }
      }
    ]
}'

By the way, the width and depth attributes referenced are associated to the item (not the variation).

Given the fact that I don’t have any item though whose depth value is equal or smaller than 20, my expectation was to not have any match. Yet, I do get several ‘matched_variation_ids’ as part of the result.

If I invert the order of the parameters, than the depth filter works but the width one doesn’t.

Hey Bryan, just checking in to see if you were about to see my response and identify the issue.