Fluent Commerce Logo
Docs

Create or Update Sourcing Profile

Essential knowledgeCore knowledge to understand Fluent Commerce

Intended Audience:

Technical User

Author:

Kirill Gaiduk

Changed on:

11 June 2026

Overview

The `createSourcingProfile` mutation creates a Sourcing Profile (or its newer version, i.e., updates) for a Retailer:
  • If the provided `ref` is unique, it creates the first version with `ACTIVE` status
  • If a `SourcingProfile` with the same `ref` already exists, it creates a new version with `DRAFT` status

Key points

  • Prerequisites: User should have `SOURCINGPROFILE_CREATE` and `SOURCINGPROFILE_VIEW` permissions
  • Retailer association is permanent: After a Retailer is assigned to a Profile, reassignment to another Retailer is not possible
  • Use clear refs and names: Follow recommended formats (e.g., `GLOBAL_DEFAULT`)
  • Order defines priority: The order of Sourcing Strategies and Criteria determines their application

Inputs

The Input fields for creating a Sourcing Profile are defined with the `CreateSourcingProfileInput`:
FieldTypeDescriptionNotes
`ref``String!`Unique reference of the Sourcing ProfileProvide a business-readable reference (in order to make the `ref` value more self-descriptive) or an universally unique identifier (UUID)Recommended format: `<SCOPE>_<SLUG>
`
Example: `GLOBAL_DEFAULT`
Parts:
  • SCOPE - where the profile applies: GLOBAL, HQ, market/region codes (ANZ, US, EU), or site codes (SYD, CHI01)
  • SLUG - short purpose label. Use uppercase letters, digits, and underscores only. Examples:
    • Operational defaults: DEFAULT, STANDARD, LOW_SPLIT
    • Speed & promise: FAST, EXPRESS, ECONOMY
    • Product/campaign: SHOES_SUMMER, BACK_TO_SCHOOL, BLACK_FRIDAY
    • Business rules: COST_OPTIMIZED, MARGIN_OPTIMIZED, DISTANCE_OPTIMIZED
    • Special flows: RETURNS_ONLY, PREORDER, VIP
The uniqueness of a Sourcing Profile is determined by the combination of `ref` and `version`
`versionComment``String`Comment for the Sourcing Profile version
`name``String!`Human-readable name of the Sourcing Profile
`description``String`Human-readable description of the Sourcing Profile
`retailer``RetailerId!`Retailer to which the Sourcing Profile belongs toThe Sourcing Profile’s Retailer is immutable after it is set by the create mutation; updates are not allowedSee the Access Validation section below for more details
`defaultVirtualCatalogue``VirtualCatalogueKey`Virtual Catalog Reference used by defaultThe Virtual Catalog Reference is required to retrieve Available-to-Sell (ATS) quantities for the requested Items
`defaultNetwork``NetworkKey`Network Reference used by defaultThe Network Reference is required to retrieve the list of available Locations for sourcing request fulfillment
`defaultMaxSplit``Int`Limit of split operations used by default`Max Split = (allowed number of Fulfillments)  - 1`
  • An empty (`null`) input is treated as zero (In this case, the sourcing request can be fulfilled by only one Fulfillment)
  • Negative inputs are invalid
`sourcingStrategies``[CreateSourcingStrategyInput!]`List of Primary Sourcing Strategies of the Sourcing ProfileThe order of inputs defines the `priority` of the Primary Sourcing Strategies
`sourcingFallbackStrategies``[CreateSourcingFallbackStrategyInput!]`List of Fallback Sourcing Strategies of the Sourcing ProfileThe order of inputs defines the `priority` of the Fallback Sourcing Strategies
The Input fields for adding Primary and Fallback Sourcing Strategies are defined with the `CreateSourcingStrategyInput` and `CreateSourcingFallbackStrategyInput`:
FieldTypeDescriptionNotes
`ref``String!`Reference of the Primary / Fallback Sourcing StrategyThe Sourcing Strategy Reference must be unique within a specific Sourcing Profile version
  • When adding a new Sourcing Strategy, provide a new unique `ref`
  • When editing an existing Sourcing Strategy, preserve the same `ref`
Recommendation: use a UUID in order to guarantee uniqueness.

Example: `9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d`
`name``String!`Human-readable name of the Primary / Fallback Sourcing Strategy
`description``String`Human-readable description of the Primary / Fallback Sourcing Strategy
`status``String`Status of the Primary / Fallback Sourcing StrategyThe `status` is `ACTIVE` by default
`virtualCatalogue``VirtualCatalogueKey`Virtual Catalog Reference used by the Primary / Fallback Sourcing Strategy
  • If a Strategy Virtual Catalog is provided, it overrides the `defaultVirtualCatalogue` value
  • If empty (`null`), the Strategy inherits the `defaultVirtualCatalogue` value
`network``NetworkKey`Network Reference used by the Primary / Fallback Sourcing Strategy
  • If a Strategy Network is provided, it overrides the `defaultNetwork` value
  • If empty (`null`), the Strategy inherits the `defaultNetwork` value
`maxSplit``Int`Limit of split operations used by the Primary / Fallback Sourcing Strategy`Max Split = (allowed number of Fulfillments)  - 1`
  • If a Strategy Max Split is provided, it overrides the `defaultMaxSplit` value
  • If empty (`null`), the Strategy inherits the `defaultMaxSplit` value
Negative inputs are invalid
`sourcingConditions``[CreateSourcingConditionInput!]`List of Sourcing Conditions that determine whether a Sourcing Strategy is applicable to a sourcing requestWhen multiple Sourcing Conditions are provided, they are evaluated using a logical AND
`sourcingCriteria``[CreateSourcingCriterionInput!]`List of Sourcing Criteria used to rank Locations during the sourcing processThe order of inputs matters because each subsequent Sourcing Criterion acts as a tie-breaker
The Input fields for adding Sourcing Conditions and Criteria are defined with the `CreateSourcingConditionInput` and `CreateSourcingCriterionInput`:
FieldTypeDescriptionNotes
`name``String!`Name of the Sourcing Condition / CriterionThe Name serves as a unique identifier for Sourcing Conditions and Criteria
`type``String!`Type of the Sourcing Condition / CriterionThe Type is mapped to a specific function in the `util-sourcing` library
`params``Json`Parameters of the Sourcing Condition / CriterionThe Parameters configure Sourcing Conditions and Criteria to support specific customer sourcing logic

Access Validation

Sample Payload