Product Factory
Last updated
Last updated
Product factory provides builder methods to help you create Firework product objects from any third-party format. Firework product objects are required for Product Hydration and Cart Sync.
extId
External ID in a partner database. It is used to match and update products synced with Firework.
Yes
name
Product name
Yes
description
Product description. Markdown for rich formating is allowed.
Yes
currency
Currency code. e.g. "USD".
Yes
Sample Code
Every product can have one or more variants. For example, a product may come in different sizes or colors. Please note each product needs at least one variant.
extId
External variant ID in a partner database. It is used to match and update product variants synced with Firework.
Yes
url
URL to product/variant detail page.
Yes
price
Numeric value of current price
Yes
sku
SKU identifier.
Optional
name
Variant name.
Optional
originalPrice
Numeric value of original price
Optional
isAvailable
Boolean indicating whether variant is currently available (out of stock).
Optional
option
Variant option. Accepts {name, value}
object (e.g {name: 'Size', value: 'Large'}
)
Optional
position
Numeric position amongst other variants. Variant options will also be sorted by this position.
Optional
To update the default pricing, a variant must be hydrated that matches the existing unit_id
extId
External image ID in partner database. It is used to match images between the partner and the Firework database.
Yes
url
URL location of an image.
Yes
title
Alt title for an image.
Optional
position
Numeric value used to sort multiple images.
Optional
primary
Boolean to set an image as primary
Optional