arazzo: 1.0.1 info: title: Shopify Launch a Product With Stock summary: Create a product, add a variant, resolve a location, and set its starting inventory. description: >- A full product launch flow from catalog to stock. The workflow creates the product, adds a priced variant carrying an inventory item, resolves the primary store location, and sets the variant's starting available quantity at that location. The caller gets a sellable, stocked product in one pass. Every step spells out its request inline so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 x-realizes-capability-ids: - BC-2370.10 - BC-530.10 x-capability-derivation: method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.' min_confidence: 0.7 sources: - capability_id: BC-2370.10 capability_name: Item Master Data Management spec: shopify-products-api-openapi.yml confidence: 0.82 - capability_id: BC-530.10 capability_name: Stock Level Management spec: shopify-inventory-levels-api-openapi.yml confidence: 0.78 model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0 sourceDescriptions: - name: inventoryLevelsApi url: ../openapi/shopify-inventory-levels-api-openapi.yml type: openapi - name: locationsApi url: ../openapi/shopify-locations-api-openapi.yml type: openapi - name: productVariantsApi url: ../openapi/shopify-product-variants-api-openapi.yml type: openapi - name: productsApi url: ../openapi/shopify-products-api-openapi.yml type: openapi workflows: - workflowId: launch-product-with-stock summary: Create a product with a variant and set its starting inventory at the primary location. description: >- Creates a product, adds a priced variant, resolves the primary location, and sets the variant's starting available quantity there. inputs: type: object required: - title - price - startingQuantity properties: title: type: string description: The product title. vendor: type: string description: The product vendor. variantTitle: type: string description: The variant option value. default: Default Title price: type: string description: The variant price as a decimal string. sku: type: string description: Stock keeping unit for the variant. startingQuantity: type: integer description: The starting available inventory quantity to set. steps: - stepId: createProduct description: Create the product shell. operationId: createProduct requestBody: contentType: application/json payload: product: title: $inputs.title vendor: $inputs.vendor status: active successCriteria: - condition: $statusCode == 201 outputs: productId: $response.body#/product/id - stepId: addVariant description: >- Add a priced variant tracked by Shopify so it carries an inventory item that can be stocked. operationId: createProductVariant parameters: - name: product_id in: path value: $steps.createProduct.outputs.productId requestBody: contentType: application/json payload: variant: option1: $inputs.variantTitle price: $inputs.price sku: $inputs.sku inventory_policy: deny successCriteria: - condition: $statusCode == 201 outputs: variantId: $response.body#/variant/id inventoryItemId: $response.body#/variant/inventory_item_id - stepId: resolveLocation description: List the store's locations and use the first location for stock. operationId: listLocations successCriteria: - condition: $statusCode == 200 outputs: locationId: $response.body#/locations/0/id - stepId: setStock description: >- Set the variant's starting available quantity at the resolved location. operationId: setInventoryLevel requestBody: contentType: application/json payload: inventory_item_id: $steps.addVariant.outputs.inventoryItemId location_id: $steps.resolveLocation.outputs.locationId available: $inputs.startingQuantity successCriteria: - condition: $statusCode == 200 outputs: available: $response.body#/inventory_level/available outputs: productId: $steps.createProduct.outputs.productId variantId: $steps.addVariant.outputs.variantId inventoryItemId: $steps.addVariant.outputs.inventoryItemId available: $steps.setStock.outputs.available