Authors:
Ben Harrison, Mubarra Khan
Changed on:
15 July 2024
The Fluent platform generates unique IDs internally, which serve as the primary key for each new record. They are unique and enforced to avoid ambiguity. Users cannot set these via API. Whereas refs are typically from third-party integrations, they represent external system IDs and occasionally are generated internally with guaranteed uniqueness. It is the integrator's responsibility to ensure refs are unique in Fluent Commerce.
IDs are generated by the Fluent platform and are guaranteed to be unique at the time of creation. The system enforces this uniqueness to ensure that each entity can be distinctly identified without any ambiguity. Users can not set this value via API.
Typically refs are values passed in via third-party integrations and should represent the IDs from external systems. On occasion when internal rules and workflows generate refs they are guaranteed to be unique e.g. Fulfilments.
Fluent is typically integrated with many other services, so orders will come from one service, products from another, and inventory from a third.
While Fluent generates unique identifiers for each of these, tracking those across many services would mean updating each one (e.g., adding a table column to store the Fluent ID, updating the REST endpoint to return it, etc.).
However, those services will usually already have a unique identifier for the order/product/inventory position. To simplify things, Fluent provides a second unique identifier for each entity in the ref field.
Rather than being auto-generated, the ref can be set by the service or connector creating the entity. This means that integrations can use the existing ID from the external service to retrieve and update the entity without making changes on the other end.
Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.