Follow the step-by-step sequence the Advanced Orders for Telesales framework runs to turn an account interaction into an ERP-consistent, released order.
Required Editions
Advanced Orders uses a structured execution sequence that mirrors your enterprise order-management and fulfillment behavior. The framework evaluates business rules, market scoping, customer listings, stock point availability, historical suggestivity, and pricing procedures in a configurable, step-by-step sequence.
Order Processing Workflow
When a sales representative or an API initiates, configures, and releases an order, order capture runs this sequence:
- Order Initiation and Scoping: The framework captures the customer account context and validates the ordering representative's assigned market against the account's market boundaries via the Internal Organization Unit (InternalOrgUnitUser and AccountInternalOrgUnit).
- Template and Orderer Validation: The framework resolves the selected Order Specification (OrderSpec) and verifies that AccountRole.AllowedOrdererType (Direct vs. Indirect) matches the template's authorized orderer rules (AllowedOrdererTypes). If an indirect order is selected, the required fulfillment wholesaler (FulfillmentAccountId) is validated against account relationships (AccountAccountRelation).
- Context Hydration: The framework populates the runtime discovery context (MACZProductDiscoveryContext or ProductDiscoveryContext) with account hierarchy nodes, location parameters, catalog IDs, and IOU attributes.
- Assortment and Listing Resolution: The framework executes the Order Rule Framework
to evaluate applicable product authorization lists:
- Account Assortments: Traverses corporate listings assigned directly or inherited across parent/child accounts using AccountFlattenedHierarchy (StoreAssortment).
- Location Assortments: Evaluates physical warehouse inventory linked to the account via AssociatedLocation (LocationAssortment).
- Closed Listing Check: Enforces OrderItemSpec.IsClosedAuthorizationList to restrict selection strictly to pre-qualified items.
- Search Index Query: The framework queries indexed product catalog data (via Product Discovery search indexing) to return fast keyword search results and dynamic facets across authorized assortment SKUs.
- Quantity Suggestion Engine: If historical suggestivity is enabled, the framework scans past orders referencing the same account and template within the configured lookback window (LookbackPeriodInDays). It filters only past orders in Activated status, computes the average quantity per product and Unit of Measure (UOM), and pre-fills item recommendations on the order grid.
- Transaction Payload and Pricing Execution: As items and quantities are added in specific packaging units (ProductUnitOfMeasure), the framework executes the pricing engine. Post-hook execution reads calculated ListPrice / NetUnitPrice and maps per-UOM prices (via ProductUOMParentReference linkage) onto each ProductDTO response.
- Delivery Lead-Time Validation: Upon entry of the requested delivery date, the framework evaluates lead-time rules (MinLeadTime, MaxLeadTime, ShouldChkDeliveryDate, and weekday permissions). If the date falls outside operational windows, an inline validation error blocks submission.
- Release and ERP Replication: The representative releases the order. The framework advances the lifecycle status from Draft to Activated, locks the record against direct edits via sharing rules, and exposes the finalized transaction payload to platform Order APIs for ERP replication, fulfillment, and billing.