Fluent Commerce Logo
Docs

Frameworks

User Interface Framework (WebApps, Manifest Configuration, Fragments, Components, and their Elements.), Orchestration Framework (Workflow, Actions, Rules, Entities, Contracts, Settings, Triggers, Status, and Variables), Developer Tooling (Modules, Templates, Connectors, and SDKs.)

Stock Segmentation - Data Model and API Overview

Essential knowledgeCore knowledge to understand Fluent Commerce
Stock Segmentation extends Fluent’s Inventory and Virtual Catalog data models to represent multiple logical segments for the same product and location using explicit, queryable factors.Stock Segmentation supports scenarios such as channel-specific reservations, manufacturing batch traceability, compliance restrictions (for example by country of origin), and supplier-level inventory management while preserving a single physical inventory model per product and location.This document explains the data model and GraphQL API capabilities introduced for Stock Segmentation.
  • Physical stock in the Inventory Catalog is stored as Inventory Quantities. You can segment them with these fields: `condition`, `expiresOn`, `countryOfOrigin`, `channel`, `manufacturer`, `manufacturerBatchNumber`, `supplier`, `storageAreaRef`, `segment1`, `segment2`, and `segment3`.
  • Inventory Quantities support parent-child hierarchies. Use the parent relationship to model multi-level segmentation trees.
  • Inventory Quantities can be linked to operational entities using `associationType` and `associationRef. `The main use cases are linking reservations and tracing stock.
  • Use Virtual Segments to expose customer-facing segments in virtual availability.
  • Segmentation fields only support exact match. Partial matching isn't supported. 
    • Exception: the `inventoryQuantities` query supports wildcard search on `condition` and `storageAreaRef`.
  • Filter values ignore case, except `type` and `status` in `updateInventoryQuantitiesStatus`.

Webhook Retries and Inline Events

Essential knowledgeCore knowledge to understand Fluent Commerce
This page explains how the Orchestration Engine retries a webhook that is reached through inline events, and helps you decide which value of `fc.rubix.webhook.retry.event` to use for your account.It describes how each workflow pattern is affected, what each value does, and what to check before you change the setting.
  • Prerequisites: Webhooks, Inline Event, Understanding Event Execution
  • A webhook action is retried only when its request fails with a network error, such as a timeout. This happens most often when the receiving system is under load, for example during peak trading
  • With `webhook-event`, the retry uses the webhook event, which is the event that triggered the ruleset in which the webhook action was produced:
    • The retry is posted to the same endpoint with the same event as the original call
    • If the receiving system responds, with any HTTP status code, the retry counts as delivered and retries stop
    • If all retries fail, the Exception event is raised for the ruleset and entity of the webhook event
  • With `initial-event`, the retry uses the initial event, which is the event that started the event context:
    • The retry is posted to the same endpoint, but with the initial event, so the event name, the entity, and the attributes can differ from the original call
    • If the receiving system responds, with any HTTP status code, the retry counts as delivered and retries stop. The original call isn’t sent again, and the Send Webhook audit event shows `SUCCESS`, so the failure goes unnoticed
    • If all retries fail, the Exception event is raised for the ruleset and entity of the initial event, not for the ruleset of the webhook event
  • The values differ only when the webhook event is an inline event. When the webhook action is produced in the ruleset triggered by the initial event, both values give the same retry
  • Accounts created before the setting was introduced keep `initial-event` until you change it. Accounts created since then use `webhook-event`. Check your workflows with this page, then switch to `webhook-event`
  • For custom webhook rules and the reference `SendWebhook` rule, also add `preserve-event-details` to the workflow, so the retry reruns the rule that produced the webhook action. Without it, the retry is sent by the built-in platform webhook rule. See `fc.rubix.sdk.webhook.retry.method`.

External Webhook Integration Architecture - commercetools Connector

Essential knowledgeCore knowledge to understand Fluent Commerce
Explains how the commercetools Connector ingests inbound webhooks and dispatches outbound payloads across the integration ecosystem. Partners will learn to configure and apply this shared framework utility, which manages message routing, handler resolution, and internal queue mechanics. For the business, this asynchronous architecture ensures real-time, secure data transmission and protects platform stability by preventing message loss during high-volume storefront traffic spikes.Note: This architectural component serves as a global framework utility rather than a single functional pipeline.
  • Core Function & Outcome: You will learn how the framework utility orchestrates bidirectional ingress and egress loops, serving as the master execution blueprint for all entity-specific data synchronization pipelines.
  • Asynchronous Queue Infrastructure: The architecture processes incoming webhook payloads through an external `ct-queue` and an internal Event Queue sequentially, decoupling network reception tasks from backend data processing to maintain platform throughput.
  • Declarative Route Filtering: Implementing partners can manage message names, configure explicit inclusion filters, and reassign target event pathways directly inside the `application-connector.yml` configuration file.
  • Extensible Handler Architecture: The core message routing and processing layers are completely decoupled, allowing developers to cleanly register custom storefront event handlers by extending the base `MessageHandler` class.

Fetching Data with the useQuery Hook

Essential knowledgeCore knowledge to understand Fluent Commerce
This lesson focuses on fetching data within a custom form field using the `useQuery` hook. We'll move away from relying on page query data and instead directly query the Fluent GraphQL API to retrieve a list of nearby locations with product stock. This involves defining data structures for query results, storing the query in a constant, and using the `useQuery` hook to execute the query with dynamic parameters derived from the form's context and the user's context (via `useAuth`). We will then render the results in a selectable list using radio buttons.
  • Data Independence: Components should fetch their own data using the `useQuery` hook, rather than relying on potentially unavailable page query data.
  • GraphQL Query: A GraphQL query (`searchVirtualInventory`) is used to retrieve nearby locations with stock.
  • Data Structures: Interfaces (SVINode, SVIResult) are defined to structure the query results.
  • `useQuery` Hook: The `useQuery` hook is used to execute the GraphQL query with dynamic parameters.
  • Dynamic Parameters: Query parameters (`productRef`, `locationRef`, `lat`, `lng`) are derived from the form's entity context (product) and the user's context (location) using the `useAuth` hook.
  • Loading State: A loading state is implemented while the query progresses.
  • Result Rendering: The query results are initially logged to the console and then rendered as a list of selectable locations using radio buttons.
  • User Selection: A state variable and event handler are used to track the user's selected location.

Add colours to statuses to highlight important information

Essential knowledgeCore knowledge to understand Fluent Commerce
This document provides an overview of enhancing visual representation within a system by displaying coloured dots. These dots serve as a quick reference to different statuses of orders or items, making it easier to recognize and prioritize tasks at a glance. You will learn how to customize the appearance of these dots by changing their colour through hex codes and understand the default settings. The guide also includes recommendations for a colour palette to optimize the utility of status indicators.
  • Feature Benefits: Utilize colourful dots to easily identify and prioritize different statuses.
  • Status Color Palette: Use recommended hex codes to customize dot colours for optimal status indication.
  • Configuration Guide: Follow step-by-step instructions to implement coloured status dots in your system. notify and prioritize different statuses.
  • Default Settings: The system defaults to a grey colour for statuses that are not configured, ensuring consistency across various status indicators.
  • Customization: Hex codes allow for full customization of dot colours to match your company's branding or to signify specific statuses.
  • Visual Prioritization: Assign colours to statuses based on the level of urgency or importance, aiding in quick decision-making.
  • Colour System Best Practices: Refer to the detailed best practices in the Colour section to effectively apply theming and enhance user experience.