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`:| Field | Type | Description | Notes |
`ref` | `String!` | Unique reference of the Sourcing Profile | Provide 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:
`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 to | The 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 default | The Virtual Catalog Reference is required to retrieve Available-to-Sell (ATS) quantities for the requested Items |
`defaultNetwork` | `NetworkKey` | Network Reference used by default | The 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`
|
`sourcingStrategies` | `[CreateSourcingStrategyInput!]` | List of Primary Sourcing Strategies of the Sourcing Profile | The order of inputs defines the `priority` of the Primary Sourcing Strategies |
`sourcingFallbackStrategies` | `[CreateSourcingFallbackStrategyInput!]` | List of Fallback Sourcing Strategies of the Sourcing Profile | The order of inputs defines the `priority` of the Fallback Sourcing Strategies |
`CreateSourcingStrategyInput` and `CreateSourcingFallbackStrategyInput`:| Field | Type | Description | Notes |
`ref` | `String!` | Reference of the Primary / Fallback Sourcing Strategy | The Sourcing Strategy Reference must be unique within a specific Sourcing Profile version
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 Strategy | The `status` is `ACTIVE` by default |
`virtualCatalogue` | `VirtualCatalogueKey` | Virtual Catalog Reference used by the Primary / Fallback Sourcing Strategy |
|
`network` | `NetworkKey` | Network Reference used by the Primary / Fallback Sourcing Strategy |
|
`maxSplit` | `Int` | Limit of split operations used by the Primary / Fallback Sourcing Strategy | `Max Split = (allowed number of Fulfillments) - 1`
|
`sourcingConditions` | `[CreateSourcingConditionInput!]` | List of Sourcing Conditions that determine whether a Sourcing Strategy is applicable to a sourcing request | When 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 process | The order of inputs matters because each subsequent Sourcing Criterion acts as a tie-breaker |
`CreateSourcingConditionInput` and `CreateSourcingCriterionInput`:| Field | Type | Description | Notes |
`name` | `String!` | Name of the Sourcing Condition / Criterion | The Name serves as a unique identifier for Sourcing Conditions and Criteria |
`type` | `String!` | Type of the Sourcing Condition / Criterion | The Type is mapped to a specific function in the `util-sourcing` library |
`params` | `Json` | Parameters of the Sourcing Condition / Criterion | The Parameters configure Sourcing Conditions and Criteria to support specific customer sourcing logic |
