Add return reasons data and category mappings #789
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

This PR introduces the foundational data structure for return reasons in the product taxonomy repository. It adds 359 curated return reasons (6 general + 353 product-specific) mapped to all taxonomy categories to help reduce the 68% of returns currently marked as "other" or "unknown".
What's included:
data/return_reasons.yml: Central definition file with all 359 return reasonsdata/localizations/return_reasons/en.yml: English localization fileData structure:
Each return reason has:
id: Unique numeric identifier (1-359)name: Human-readable display namehandle: Snake_case identifier for codefriendly_id: URL-safe slug for category referencesdescription: Plain text explanation of when to use this reasonDesign decisions:
gid://shopify/ReturnReasonDefinition/{id}format (see open discussion below)Context:
This is part of the Better Return Reasons project to provide category-specific return reasons automatically across Admin, POS, Self-Serve Returns, and public APIs. The return reasons are being integrated into the public taxonomy repository for discoverability, versioning, and localization alongside categories and attributes.
Open Discussion - GID Format:
There's an ongoing discussion about the GID naming convention:
gid://shopify/ReturnReasonDefinition/{id}- maintains consistency with Core DB and avoids breaking changes to existing API integrationsgid://shopify/TaxonomyReturnReason/{id}- would align with other taxonomy GIDs (TaxonomyCategory,TaxonomyAttribute,TaxonomyValue)Tradeoffs:
ReturnReasonDefinition: Consistent with Core DB implementation, avoids significant rework in API schema/resolvers/integrations. Also maintains conceptual separation: return reasons are an add-on to taxonomy (distinct from its three core elements: categories, attributes, and values), so omitting the "Taxonomy" prefix reinforces this distinction.TaxonomyReturnReason: Consistent with taxonomy naming patterns (TaxonomyCategory,TaxonomyAttribute,TaxonomyValue), but would require breaking changes to Core DB and API integrations, potentially impacting delivery timeline. Also implies return reasons are core taxonomy entities rather than supplementary features.Stakeholder input welcome on whether consistency with existing taxonomy naming patterns outweighs the implementation complexity and the conceptual model of return reasons as add-ons vs. core taxonomy entities.
How mappings were created:
Review notes:
Prototype/Placeholder Status:
Files to Include
data/return_reasons.ymldata/localizations/return_reasons/en.ymldata/categories/aa_apparel_accessories.ymldata/categories/ae_arts_entertainment.ymldata/categories/ap_animals_pet_supplies.ymldata/categories/bi_business_industrial.ymldata/categories/bt_baby_toddler.ymldata/categories/bu_bundles.ymldata/categories/co_cameras_optics.ymldata/categories/el_electronics.ymldata/categories/fb_food_beverages_tobacco.ymldata/categories/fr_furniture.ymldata/categories/gc_gift_cards.ymldata/categories/ha_hardware.ymldata/categories/hb_health_beauty.ymldata/categories/hg_home_garden.ymldata/categories/lb_luggage_bags.ymldata/categories/ma_mature.ymldata/categories/me_media.ymldata/categories/na_uncategorized.ymldata/categories/os_office_supplies.ymldata/categories/pa_product_add_ons.ymldata/categories/rc_religious_ceremonial.ymldata/categories/se_services.ymldata/categories/sg_sporting_goods.ymldata/categories/so_software.ymldata/categories/tg_toys_games.ymldata/categories/vp_vehicles_parts.ymlDependencies
Review Focus