Fluent Commerce Logo
Docs

Sourcing Profile GraphQL API Overview

Essential knowledge

Intended Audience:

Technical User

Author:

Kirill Gaiduk

Changed on:

2 Oct 2025

Overview

This article provides technical users with information about the Sourcing Profile GraphQL API, which enables configuration and querying of Sourcing Profiles within the Fluent Platform.

Key points

  • Specific permissions are required for Sourcing Profile operations
  • Use the `createSourcingProfile` mutation to create new Sourcing Profiles or generate updated versions
  • Activate a profile version with the `activateSourcingProfile` mutation; this sets it to `ACTIVE` and automatically sets the previous `ACTIVE` profile version to `INACTIVE`
  • Retrieve Profiles using the `sourcingProfile` query (single Sourcing Profile by Reference) or `sourcingProfiles` query (multiple, with filters)
  • Every update creates a new version of the Sourcing Profile, ensuring full version history is preserved

What is the Sourcing Profile GraphQL API for?

The Sourcing Profile GraphQL API allows technical users to manage sourcing logic within the Fluent Platform:

  • Create, update, activate, and query Sourcing Profiles
  • Define Primary and Fallback Sourcing Strategies
  • Configure Sourcing Conditions and Criteria within each Sourcing Strategy

Sourcing Profile Management

The following diagram explains the key steps of Sourcing Profile management:

No alt provided

Permissions

The following permissions are required for different operations on Sourcing Profiles:

  • `SOURCINGPROFILE_CREATE`
  • `SOURCINGPROFILE_UPDATE`
  • `SOURCINGPROFILE_VIEW`

Decision Flow

The following diagram explains the Sourcing Profile GraphQL API behavior:

No alt provided

Features

The Sourcing Profile GraphQL API provides the following functionalities:

Create or Update Sourcing Profile

The `createSourcingProfile` mutation creates a Sourcing Profile (or its newer version) 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

Activate Sourcing Profile

The `activateSourcingProfile` mutation activates a specific version of a Sourcing Profile. When called, it performs the following actions:

  • Sets the specified version status to `ACTIVE`
  • Updates the previously `ACTIVE` version to `INACTIVE`

Get Sourcing Profile

The `sourcingProfile` query retrieves a Sourcing Profile by its Reference:

  • If a version is provided, the query returns that specific version
  • If no version is provided, the query returns the latest available version

Search Sourcing Profiles

The `sourcingProfiles` query retrieves existing Sourcing Profiles and supports multiple filters and pagination. For example, you can use it to:

  • Return active Profiles by applying the `ACTIVE` status filter
  • Review the audit history of inactive versions with the `INACTIVE` status filter
  • Access drafts that are still in progress with the `DRAFT` status filter

Reference Usage

Here is a collection of common scenarios for the Sourcing Profile GraphQL API usage: