Fluent Commerce Logo
Docs

Search Sourcing Profiles

Essential knowledge

Intended Audience:

Technical User

Author:

Kirill Gaiduk

Changed on:

2 Oct 2025

Overview

The `sourcingProfiles` query retrieves existing Sourcing Profiles. 

It supports multiple filters and pagination.

Key points

  • Prerequisites: User should have `SOURCINGPROFILE_VIEW` permission
  • Flexible Filtering: Multiple filters are supported, including `ref`, `version`, `versionComment`, `name`, `description`, `status`, `defaultMaxSplit`, and date ranges (`createdOn`, `updatedOn`). This lets you target specific Profiles or narrow results down by lifecycle state and time window
  • Pagination Support: The query supports cursor-based pagination (`first`, `last`, `before`, `after`), making it efficient to handle large sets of Sourcing Profiles 

Inputs

The Input arguments for retrieving Sourcing Profiles (i.e., filters):

Field

Type

Description

Notes

`ref`

`[String!]`

Reference of the Sourcing Profile


`version`

`[Int]`

Version number of the Sourcing Profile


`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


`status`

`[String]`

Status of the Sourcing Profile

For example:

  • `ACTIVE`
  • `INACTIVE`
  • `DRAFT`

`createdOn`

`DateRange`

Filter by creation date

Specify range with `from` and `to`

`updatedOn`

`DateRange`

Filter by last updated date

Specify range with `from` and `to`

`defaultMaxSplit`

`[Int]`

Limit of split operations used by default


`first`

`Int`

Return the first n results


`last`

`Int`

Return the last n results


`before`

`String`

Return results before the specified global ID

This is a cursor (the value is used for pagination)

`after`

`String`

Return results after the specified global ID

This is a cursor (the value is used for pagination)

Access Validation

The GraphQL framework applies the Standard Permission Check for the target operation and entity:

  • Retailer scope: The Retailer associated with the target entity (or provided in the request) defines the scope for evaluation
  • Role-based access: A user can hold one or more user roles. Each `UserRole` contributes:
    • Permissions via its assigned role (e.g., `SOURCINGPROFILE_CREATE`, `SOURCINGPROFILE_UPDATE`, `SOURCINGPROFILE_VIEW`)
    • Contexts (`RoleContext`) that scope those permissions:
      • `ACCOUNT` - applies across all Retailers
      • `RETAILER` - applies only when the context’s Retailer ID (`contextId`) matches the target Retailer

Result: The request succeeds only if at least one user role grants the required permission in a context applicable to the target Retailer; otherwise, the request is denied or the response contains `null`.

Sample Payload

1query sourcingProfiles($ref: [String!]){
2 sourcingProfiles(ref: $ref) {
3    edges {
4        node {
5            id
6            ref
7            version
8            versionComment
9            name
10            description
11            status
12            user {
13                id
14            }
15            createdOn
16            updatedOn
17            retailer {
18                id
19            }
20            defaultVirtualCatalogue {
21                ref
22            }
23            defaultNetwork {
24                ref
25            }
26            defaultMaxSplit
27            sourcingStrategies {
28                id
29                ref
30                sourcingProfile {
31                    id
32                }
33                name
34                description
35                status
36                priority
37                createdOn
38                updatedOn
39                virtualCatalogue {
40                    ref
41                }
42                network {
43                    ref
44                }
45                maxSplit
46                sourcingConditions {
47                    name
48                    type
49                    params
50                }
51                sourcingCriteria {
52                    name
53                    type
54                    params
55                }
56            }
57            sourcingFallbackStrategies {
58                id
59                ref
60                sourcingProfile {
61                    id
62                }
63                name
64                description
65                status
66                priority
67                createdOn
68                updatedOn
69                virtualCatalogue {
70                    ref
71                }
72                network {
73                    ref
74                }
75                maxSplit
76                sourcingConditions {
77                    name
78                    type
79                    params
80                }
81                sourcingCriteria {
82                    name
83                    type
84                    params
85                }
86            }
87        }
88    }
89 }
90}
1{
2    "ref": ["GLOBAL_DEFAULT"]   
3}
1{
2    "data": {
3        "sourcingProfiles": {
4            "edges": [
5                {
6                    "node": {
7                        "id": "1129",
8                        "ref": "GLOBAL_DEFAULT",
9                        "version": 2,
10                        "versionComment": "Lorem ipsum",
11                        "name": "UPDATED Lorem ipsum",
12                        "description": "Lorem ipsum",
13                        "status": "ACTIVE",
14                        "user": {
15                            "id": "1982"
16                        },
17                        "createdOn": "2025-09-01T10:19:08.618Z",
18                        "updatedOn": "2025-09-01T12:51:19.370Z",
19                        "retailer": {
20                            "id": "1"
21                        },
22                        "defaultVirtualCatalogue": {
23                            "ref": "BASE:1"
24                        },
25                        "defaultNetwork": {
26                            "ref": "CLICK_AND_COLLECT"
27                        },
28                        "defaultMaxSplit": 5,
29                        "sourcingStrategies": [
30                            {
31                                "id": "2309",
32                                "ref": "bbc42abb-609b-495a-ab74-d3c6d55ca445",
33                                "sourcingProfile": {
34                                    "id": "1129"
35                                },
36                                "name": "Primary Lorem ipsum",
37                                "description": "Primary Lorem ipsum",
38                                "status": "ACTIVE",
39                                "priority": 1,
40                                "createdOn": "2025-09-01T10:19:08.621Z",
41                                "updatedOn": "2025-09-01T10:19:08.621Z",
42                                "virtualCatalogue": null,
43                                "network": null,
44                                "maxSplit": null,
45                                "sourcingConditions": null,
46                                "sourcingCriteria": [
47                                    {
48                                        "name": "locationDistance",
49                                        "type": "fc.sourcing.criterion.locationDistance",
50                                        "params": null
51                                    }
52                                ]
53                            }
54                        ],
55                        "sourcingFallbackStrategies": [
56                            {
57                                "id": "1129",
58                                "ref": "7c194aef-dd50-4d8e-9b8d-b59df4090740",
59                                "sourcingProfile": {
60                                    "id": "1129"
61                                },
62                                "name": "Fallback Lorem ipsum",
63                                "description": "Fallback Lorem ipsum",
64                                "status": "ACTIVE",
65                                "priority": 1,
66                                "createdOn": "2025-09-01T10:19:08.620Z",
67                                "updatedOn": "2025-09-01T10:19:08.620Z",
68                                "virtualCatalogue": null,
69                                "network": null,
70                                "maxSplit": null,
71                                "sourcingConditions": null,
72                                "sourcingCriteria": [
73                                    {
74                                        "name": "locationDistance",
75                                        "type": "fc.sourcing.criterion.locationDistance",
76                                        "params": null
77                                    }
78                                ]
79                            }
80                        ]
81                    }
82                },
83                {
84                    "node": {
85                        "id": "1128",
86                        "ref": "GLOBAL_DEFAULT",
87                        "version": 1,
88                        "versionComment": "Lorem ipsum",
89                        "name": "Lorem ipsum",
90                        "description": "Lorem ipsum",
91                        "status": "INACTIVE",
92                        "user": {
93                            "id": "1982"
94                        },
95                        "createdOn": "2025-09-01T10:18:24.113Z",
96                        "updatedOn": "2025-09-01T10:21:49.386Z",
97                        "retailer": {
98                            "id": "1"
99                        },
100                        "defaultVirtualCatalogue": {
101                            "ref": "BASE:1"
102                        },
103                        "defaultNetwork": {
104                            "ref": "CLICK_AND_COLLECT"
105                        },
106                        "defaultMaxSplit": 5,
107                        "sourcingStrategies": [
108                            {
109                                "id": "2308",
110                                "ref": "bbc42abb-609b-495a-ab74-d3c6d55ca445",
111                                "sourcingProfile": {
112                                    "id": "1128"
113                                },
114                                "name": "Primary Lorem ipsum",
115                                "description": "Primary Lorem ipsum",
116                                "status": "ACTIVE",
117                                "priority": 1,
118                                "createdOn": "2025-09-01T10:18:24.118Z",
119                                "updatedOn": "2025-09-01T10:18:24.118Z",
120                                "virtualCatalogue": null,
121                                "network": null,
122                                "maxSplit": null,
123                                "sourcingConditions": null,
124                                "sourcingCriteria": [
125                                    {
126                                        "name": "locationDistance",
127                                        "type": "fc.sourcing.criterion.locationDistance",
128                                        "params": null
129                                    }
130                                ]
131                            }
132                        ],
133                        "sourcingFallbackStrategies": [
134                            {
135                                "id": "1128",
136                                "ref": "7c194aef-dd50-4d8e-9b8d-b59df4090740",
137                                "sourcingProfile": {
138                                    "id": "1128"
139                                },
140                                "name": "Fallback Lorem ipsum",
141                                "description": "Fallback Lorem ipsum",
142                                "status": "ACTIVE",
143                                "priority": 1,
144                                "createdOn": "2025-09-01T10:18:24.115Z",
145                                "updatedOn": "2025-09-01T10:18:24.115Z",
146                                "virtualCatalogue": null,
147                                "network": null,
148                                "maxSplit": null,
149                                "sourcingConditions": null,
150                                "sourcingCriteria": [
151                                    {
152                                        "name": "locationDistance",
153                                        "type": "fc.sourcing.criterion.locationDistance",
154                                        "params": null
155                                    }
156                                ]
157                            }
158                        ]
159                    }
160                }
161            ]
162        }
163    }
164}