{"section":"known-issues","requestedLocale":"en","requestedSlug":"b2b-organizations-does-not-limit-the-number-of-collections-set-for-an-organization-which-may-lead-to-segmentbased-filters-not-working","locale":"en","slug":"b2b-organizations-does-not-limit-the-number-of-collections-set-for-an-organization-which-may-lead-to-segmentbased-filters-not-working","path":"docs/en/known-issues/B2B/b2b-organizations-does-not-limit-the-number-of-collections-set-for-an-organization-which-may-lead-to-segmentbased-filters-not-working.md","branch":"main","content":"## Summary\n\nIn stores using B2B Suite, if too many collections are added to the Organization configuration, the search page filtering may not work, which causes all products to be returned, including those that are not set on any collection set for the user's organization.\n\nThis occurs because too many `productClusterIds` are added to the segment, causing the `vtex_segment` cookie to exceed size limits and facets to be dropped; any flow depending on the segment cookie can be affected, not just search.\n\nThe B2B Organizations app should limit the number of collections added to an Organization upon creation/update to avoid this scenario, which it currently doesn't do.\n\n## Simulation\n\n- Prerequisites:\n  - B2B Suite installed and configured with many product clusters assigned to the buyer’s organization.\n  - Clean workspace using B2B native theme, no custom apps.\n\n- Steps:\n  - Log in as a user which has access to the organization configured with many Collections assigned.\n  - Load the storefront and perform a full-text search which should return only products from the assigned collections.\n  - Check that products from other collections are also returned.\n  - Inspect:\n    - `GET /api/sessions?items=*` and confirm `public.facets` and `search.facets` contain the `porductClusterIds` from the collection.\n    - `GET /api/segments` and observe the segment is returned without facets, indicating the cookie did not carry them due to size limits. In the console, you can also see a Set-Cookie size limit error.\n    - `productSearch` request is sent with a segment lacking facets, and search returns products not in the organization's allowed collections.\n\n## Workaround\n\nReduce the number of collections assigned to the organization (consolidate or group collections)"}