api.scripts.create_product_shopify

Creates the Shopify product of an Airtable Model (record_id: the Model id).

The whole product (options, variants, prices, stock, weight, image) is written by one productSet (api/services/shopify_products.py), then its metafields and documentation PDF. Strict: a Model missing a description, weight, type or a usable photo is not created.

Never twice: before creating, every product the Model’s “Annonces Shopify” records point to is looked up on Shopify; right after creating, the record is written (or a record whose product is gone is reused), so a retried trigger finds it and stops. A creation that fails after that is rolled back, and the Model’s next triggers are skipped for ROLLBACK_COOLDOWN_SECONDS.

Attributes

Classes

Module Contents

api.scripts.create_product_shopify.logger
api.scripts.create_product_shopify.ROLLBACK_COOLDOWN_SECONDS = 900
class api.scripts.create_product_shopify.CreateProductShopifyScript
name = 'create_product_shopify'
schedule = None
is_configured() → bool
run(previous_snapshot: dict[str, Any] | None = None, report_stage: api.scripts.base.StageReporter = lambda stage: ..., **kwargs: Any) → tuple[api.scripts.base.ScriptResult, dict[str, Any] | None]