Action API
The Action API provides modal presentation functionality for POS UI extensions, allowing you to launch full-screen modal interfaces from menu items, tiles, and block targets. The API enables navigation between different targets within your extension.
Anchor to Use casesUse cases
- Modal launch: Launch workflows from menu item buttons or tile interfaces.
- Multi-step processes: Create processes requiring more screen space than basic components allow.
- Forms: Implement modal-based forms, configuration interfaces, or data entry workflows.
- Wizard interfaces: Build wizard-style interfaces that guide users through complex operations.
Supported targets
- pos.
cart. line-item-details. action. menu-item. render - pos.
cart. line-item-details. action. render - pos.
customer-details. action. menu-item. render - pos.
customer-details. block. render - pos.
draft-order-details. action. menu-item. render - pos.
draft-order-details. block. render - pos.
exchange. post. action. menu-item. render - pos.
exchange. post. block. render - pos.
home. tile. render - pos.
order-details. action. menu-item. render - pos.
order-details. block. render - pos.
product-details. action. menu-item. render - pos.
product-details. block. render - pos.
purchase. post. action. menu-item. render - pos.
purchase. post. block. render - pos.
register-details. action. menu-item. render - pos.
register-details. block. render - pos.
return. post. action. menu-item. render - pos.
return. post. block. render
Supported targets
- pos.
cart. line-item-details. action. menu-item. render - pos.
cart. line-item-details. action. render - pos.
customer-details. action. menu-item. render - pos.
customer-details. block. render - pos.
draft-order-details. action. menu-item. render - pos.
draft-order-details. block. render - pos.
exchange. post. action. menu-item. render - pos.
exchange. post. block. render - pos.
home. tile. render - pos.
order-details. action. menu-item. render - pos.
order-details. block. render - pos.
product-details. action. menu-item. render - pos.
product-details. block. render - pos.
purchase. post. action. menu-item. render - pos.
purchase. post. block. render - pos.
register-details. action. menu-item. render - pos.
register-details. block. render - pos.
return. post. action. menu-item. render - pos.
return. post. block. render
Anchor to PropertiesProperties
The shopify global object provides modal presentation functionality. Access the following properties on shopify to launch full-screen modal interfaces from menu items, tiles, and block targets.
- Anchor to presentModalpresentModalpresentModal() => void() => voidrequiredrequired
Presents the corresponding action (modal) target on top of the current view as a full-screen modal. For example, calling this method from
pos.purchase.post.action.menu-item.renderpresentspos.purchase.post.action.render. Use to launch detailed workflows, complex forms, or multi-step processes that require more screen space than simple components provide.
Anchor to Best practicesBest practices
- Use modals for complex workflows: Reserve modals for operations that genuinely require more screen space, multiple steps, or complex interactions that can't be handled by simple button actions.
- Provide clear entry points: Use descriptive button labels and titles that clearly indicate what the modal will contain or what action it will perform, helping users understand what to expect.
- Handle modal dismissal gracefully: Ensure your modal-based workflows handle user dismissal, saving progress when possible and providing clear feedback about incomplete operations.
Anchor to LimitationsLimitations
The presentModal() method must be called from a user interaction (such as a button click or tile tap) and can't be invoked programmatically during extension initialization or from background operations.