Purchase Order Quick Start
Get started with the Purchase Order drop-in to enable purchase order approval workflows in your B2B storefront.
Version: 1.0.0-beta3
Quick example
The Purchase Order drop-in is included in the Commerce boilerplate . This example shows the basic pattern:
// 1. Import initializer (handles all setup)import '../../scripts/initializers/purchase-order.js';
// 2. Import the container you needimport ApprovalRuleDetails from '@dropins/storefront-purchase-order/containers/ApprovalRuleDetails.js';
// 3. Import the providerimport { render as provider } from '@dropins/storefront-purchase-order/render.js';
// 4. Render in your blockexport default async function decorate(block) { await provider.render(ApprovalRuleDetails, { // Configuration options - see Containers page })(block);}New to drop-ins? See the Using drop-ins guide for complete step-by-step instructions.
Quick reference
Import paths:
- Initializer:
import '../../scripts/initializers/purchase-order.js' - Containers:
import ContainerName from '@dropins/storefront-purchase-order/containers/ContainerName.js' - Provider:
import { render } from '@dropins/storefront-purchase-order/render.js'
Package: @dropins/storefront-purchase-order
Version: 1.0.0-beta3 (verify compatibility with your Commerce instance)
Example container: ApprovalRuleDetails
Learn more
- Containers - Available UI components and configuration options
- Initialization - Customize initializer settings and data models
- Functions - Control drop-in behavior programmatically
- Events - Listen to and respond to drop-in state changes
- Slots - Extend containers with custom content