zonix-order-lifecycle

Enforce order state transitions and emit OrderStatusChanged events in Zonix Eats.

1|1|Updated May 24, 2025
One-click install
npx skills add https://github.com/Abrahan-Eagle/zonix-eats-front --skill zonix-order-lifecycle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: zonix-order-lifecycle
Source: https://github.com/Abrahan-Eagle/zonix-eats-front/tree/main/.agents/skills/zonix-order-lifecycle
Command: npx skills add https://github.com/Abrahan-Eagle/zonix-eats-front --skill zonix-order-lifecycle

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill defines and enforces a robust, end-to-end order lifecycle for Zonix Eats, ensuring consistent state management, validated transitions, and reliable event emissions across buyer, commerce, delivery, and admin workflows.

Core Features & Use Cases

  • State machine enforcement: Only allowed transitions (pending_payment -> paid -> processing -> shipped -> delivered; cancellations allowed from paid or processing) are permitted, preventing invalid status changes.
  • Event-driven updates: Emits OrderStatusChanged events after every state change to sync real-time dashboards and external services.
  • Payment validation & cancellation rules: Handles manual/payment validations and complex cancellation rules with penalties as defined.
  • Comprehensive data model & API coverage: Describes the Order model fields, relationships, and endpoints for buyers, commerce, delivery, and admins.

Quick Start

Integrate the Order lifecycle by enforcing the valid transitions and emitting OrderStatusChanged events after each update.

Frequently Asked Questions about zonix-order-lifecycle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce a strict state machine for ecommerce order management transitions?

You enforce strict order management state machine transitions by applying defined rules like pending_payment to paid to processing to shipped to delivered, preventing invalid status changes across buyer, commerce, delivery, and admin workflows.

How does an order state machine handle event-driven real-time updates?

An order state machine handles event-driven updates by emitting OrderStatusChanged events after every valid state transition, syncing real-time dashboards and external services automatically upon each lifecycle progression or cancellation.

What are the valid cancellation rules for an order lifecycle state machine?

Valid cancellation rules in an order lifecycle state machine permit cancellations only from the paid or processing states, applying defined penalty validations during the transition to maintain data integrity across buyer and commerce workflows.

Can I use a single order lifecycle model for buyer, delivery, and admin workflows?

Yes, you can use a single comprehensive order lifecycle model for buyer, delivery, and admin workflows. It describes shared Order model fields, relationships, and endpoints to maintain consistent state management across all domains.

What's the best way to validate payments during order state transitions?

The best way to validate payments during order state transitions is to enforce manual payment validations within the state machine, ensuring the order only moves from pending_payment to paid after strict validation rules are satisfied.

Why does my order state transition fail when skipping the processing status?

Order state transitions fail when skipping statuses because the state machine strictly enforces sequential paths like paid to processing to shipped, rejecting any invalid status changes that bypass defined lifecycle rules.