Sample Flow

This article shares a possible use case your app could support, as well as a sample flow that could support this use case. This can be a helpful jumping-off point as you plan your app's implementation.

Set up and retrieve basic customizations for a clothing store

  1. Create a Customization with Option type, which will have different product colors: red, green, blue.
    • Render type must be SwatchChoices and choice types must be ONE_COLOR.
  2. Create a Customization with Option type, which will have different product sizes: S, M, L, XL.
    • Render type must be TextChoices and choice types must be CHOICE_TEXT.
  3. Create a Customization with Modifier type, in order to specify free text to be on a product.
    • Render type must be FreeText.
    • Set freeTextInput's title to "Choose text to be on shirt", and have a 10 char count minimum.
  4. Use add customization choices method to add more color choices on Color customization (for example add the color yellow - color code #FFFF00).
  5. Query for all the Product options of type SWATCH_CHOICES (colors) - should return one result.

Create product with new option

In order to assign a new non-existing option to a new product, you can provide the option to the Create Product request.

To do this, your app can call Create Product with Create Product and assign a new option to the product by passing a the name, option_render_type and choices:

Copy
1

Note that if an option with option.name already exists, it will assign the existing option to the product.

Create product with new modifier

In order to assign a new non-existing modifier to a new product, you can provide the modifier to the Create Product request.

To do this, your app can call Create Product with Create Product and assign a new option to the product by passing a the name, modifier_render_type and free_text_settings:

Copy
1

Note that if a modifier with modifier.name already exists, it will assign the existing modifier to the product.

Was this helpful?
Yes
No