Customizations API: Sample Flows

This article presents possible use cases and corresponding sample flows that you can support. This can be a helpful jumping off point as you plan your implementation.

Set up customizations for a clothing store

  1. Create a Customization with type PRODUCT_OPTION, and with different product colors (choices): red, green, blue.
    • Render type must be SWATCH_CHOICES and choice type must be ONE_COLOR.
    Copy
  2. Create a Customization, with type PRODUCT_OPTION, and with different product sizes (choices): S, M, L, XL.
    • Customization render type must be TEXT_CHOICES and choice types must be CHOICE_TEXT.
    Copy
  3. Create a Customization, with type MODIFIER, in order to specify free text to be on a product.
    • Render type must be FREE_TEXT.
    • Set freeTextInput.title to "Choose text to be on shirt", and have and a range of 10-50 characters.
    Copy
  4. Add customization choices to the Color customization (for example, add yellow).
    Copy
  5. Query for all the customizations of type PRODUCT_OPTION and render type SWATCH_CHOICES.

Create a product with new options

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

To create a product with new options, call Create Product and pass the name, optionRenderType, and choices:

Copy

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

Create a product with new modifiers

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

To create a product with new modifiers, call Create Product and pass the name, modifierRenderType, and freeTextSettings:

Copy

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

Update an option name

To change the name of an option, which updates all products to which it is assigned, call Update Customization with the requested changes:

Copy

Delete a modifier

To delete a modifier, which removes it from any product to which it is assigned, call Delete Customization with the customizationId of the modifier you want to delete:

Copy
Did this help?