Skip to content

Conversation

@GediminasGaubys
Copy link
Contributor

@GediminasGaubys GediminasGaubys commented Jan 22, 2026

[Shopify] Item Attributes as Product Options

Summary

This PR introduces support for using Item Attributes as Shopify Product Options. Item Attributes marked with "As Option" in the Shpfy Incl. in Product Sync field are now synchronized to Shopify as Product Options, enabling variant differentiation based on attribute values (e.g., Color, Size, Material).

Note: If "UoM as Variant" is enabled in Shopify Shop settings, Item Attributes as Product Options functionality is bypassed. Enabling "UoM as Variant" fails when "As Option" Item Attributes exist in the system.

Changes

New Functionality:

  • Item Attribute "As Option" designation: Item Attributes can be marked with Shpfy Incl. in Product Sync = "As Option" to indicate they should become Shopify Product Options
  • Export Item Attributes as Options: When exporting Items to Shopify, marked Item Attributes are converted to Product Options with their values
  • Validation for new variants: When adding an Item as a variant to an existing product, the system validates that the Item has all required "As Option" attributes and that the option value combination is unique
  • Shopify 3-option limit enforcement: Items with more than 3 "As Option" attributes are rejected with a skipped entry, respecting Shopify's maximum of 3 product options

Validation Rules:

  • Items missing required "As Option" attributes cannot be added as variants to existing products
  • Duplicate option value combinations are detected and rejected
  • Items with more than 3 "As Option" attributes fail compatibility check
  • Item Variants must have all "As Option" attributes assigned

Tests:

  • Added ShpfyItemAttrAsOptionTest.Codeunit.al (ID 139540) with tests for:
    • UoM as Variant validation when As Option attributes exist
    • Exporting Items without variants and without As Option attributes
    • Adding Items as variants to products without As Option attributes
    • Exporting Items with As Option attributes (creates variants with options)
    • Validation failure when Item is missing required attributes
    • Validation failure when option value combination already exists
    • Successfully adding Item as variant with different attribute values
    • Exporting Items with variants and without As Option attributes
    • Exporting Items with variants and 3 As Option attributes (unique combinations)
    • Exporting Items with duplicate option value combinations (catches faillure)
    • Exporting Items with more than 3 As Option attributes (catches faillure)

Fixes #
AB#605734

…utes (checks for existing product options and ensuring unique combinations)
@GediminasGaubys GediminasGaubys requested a review from a team as a code owner January 22, 2026 09:05
@github-actions github-actions bot added AL: Apps (W1) Add-on apps for W1 From Fork Pull request is coming from a fork labels Jan 22, 2026
@github-actions
Copy link

Could not find linked issues in the pull request description. Please make sure the pull request description contains a line that contains 'Fixes #' followed by the issue number being fixed. Use that pattern for every issue you want to link.

@github-actions github-actions bot added the Linked Issue is linked to a Azure Boards work item label Jan 22, 2026
@github-actions github-actions bot added this to the Version 28.0 milestone Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 From Fork Pull request is coming from a fork Linked Issue is linked to a Azure Boards work item

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants