Fluent Commerce Logo
Docs

Configure Multi-Region Sourcing Logic

How-to Guide

Author:

Kirill Gaiduk

Changed on:

2 Oct 2025

Key Points

  • Use the Responsive Sourcing Framework building blocks to manage your sourcing logic
  • Use the `createSourcingProfile` mutation to create new versions of Sourcing Profiles, which are immutable
  • Activate relevant Sourcing Profiles versions with the `activateSourcingProfile` mutation
  • Reference Sourcing Profiles within the corresponding Workflows
No alt text provided

Steps

Step arrow right iconCreate Networks

1. Use the `createNetwork` mutation to create the Puget Sound (`PS`) Default Network for your Sourcing Profile, including all the Locations from `SM_LS`, `SJI_LS`, `SM_WH` Networks.

2. Configure your Network using the `CreateNetworkInput` fields:

No alt provided
  • Use a unique `CreateNetworkInput.name` value (it is saved in the `Network.ref` field).
  • Use the `network` query to get the list of Location Ids by Network Reference.

3. Repeat the points 1 and 2 for the following Networks creation:

  • `SM` for Seattle Metro
  • `SJI` for for San Juan Islands
No alt provided

Step arrow right iconCreate Sourcing Profile

1. Use the `createSourcingProfile` mutation to create a new Sourcing Profile, including its:

  • Primary and Fallback Sourcing Strategies with their
  • Sourcing Conditions and Criteria

2. Configure your Sourcing Profile using the `CreateSourcingProfileInput` fields:

No alt provided
  • Use a unique Sourcing Profile `ref` for new Profile creation
  • Virtual Catalog, Network, and Max Split can be overridden at the Sourcing Strategy level (If not specified, the Profile’s default values will be inherited).

3. Configure your Primary Sourcing Strategies using the `CreateSourcingStrategyInput` fields:

No alt provided
  • Seattle Metro Sourcing Strategy restricts available Locations to those within the Seattle Metro region (`SM` Network)
  • San Juan Islands Sourcing Strategy allows fulfillment from stores within the San Juan Islands region, as well as cross-region delivery from warehouses located in the Seattle Metro (`SJI` Network)
  • Both Strategies inherit the Virtual Catalog and Max Split defaults from the Sourcing Profile
  • The order of Sourcing Strategies in the `"sourcingStrategies": []` defines their `priority`

4. Configure your Fallback Sourcing Strategies using the `CreateSourcingFallbackStrategyInput` fields:

No alt provided
  • Coastal Sourcing Strategy inherits the Sourcing Profile's Virtual Catalog, Network, and Max Split defaults

5. Define Sourcing Conditions using the `CreateSourcingConditionInput` fields:

No alt provided
  • Destination sourcing restrictions are enforced based on Delivery Region Sourcing Conditions for Seattle Metro and San Juan Islands Sourcing Strategies
  • A Product-specific restriction applies to the Coastal Fallback Sourcing Strategy

6. Define Sourcing Criteria using the `CreateSourcingCriterionInput` fields:

No alt provided
  • For Seattle Metro Strategy, Locations are ranked based on:
    • Local stores preferred over warehouses
    • Distance to the destination as a tie-breaker
  • For San Juan Islands Strategy, ranking is based on region-compliant Network prioritization
  • For Coastal Strategy:
    • Limits Locations within a specified radius
    • Allows partial Order fulfillment, prioritizing monetary value a Location can fulfill
Sample createSourcingProfile Payload
1mutation createSourcingProfile($input: CreateSourcingProfileInput) {
2    createSourcingProfile (input: $input) {
3        id
4        ref
5        version
6        versionComment
7        name
8        description
9        status
10        user {
11            id
12        }
13        createdOn
14        updatedOn
15        retailer {
16            id
17        }
18        defaultVirtualCatalogue {
19            ref
20        }
21        defaultNetwork {
22            ref
23        }
24        defaultMaxSplit
25        sourcingStrategies {
26            id
27            ref
28            sourcingProfile {
29                id
30            }
31            name
32            description
33            status
34            priority
35            createdOn
36            updatedOn
37            virtualCatalogue {
38                ref
39            }
40            network {
41                ref
42            }
43            maxSplit
44            sourcingConditions {
45                name
46                type
47                params
48            }
49            sourcingCriteria {
50                name
51                type
52                params
53            }
54        }
55        sourcingFallbackStrategies {
56            id
57            ref
58            sourcingProfile {
59                id
60            }
61            name
62            description
63            status
64            priority
65            createdOn
66            updatedOn
67            virtualCatalogue {
68                ref
69            }
70            network {
71                ref
72            }
73            maxSplit
74            sourcingConditions {
75                name
76                type
77                params
78            }
79            sourcingCriteria {
80                name
81                type
82                params
83            }
84        }
85    }
86}
1{
2  "input": {
3    "ref": "Puget_Sound",
4    "versionComment": "First version of Puget_Sound",
5    "name": "Puget_Sound",
6    "description": "Profile Description",
7    "retailer": {
8      "id": 1
9    },
10    "defaultVirtualCatalogue": {
11      "ref": "BASE:PS"
12    },
13    "defaultNetwork": {
14      "ref": "PS"
15    },
16    "defaultMaxSplit": 5,
17    "sourcingStrategies": [
18      {
19        "ref": "Seattle_Metro",
20        "name": "Seattle_Metro",
21        "description": "Seattle_Metro Sourcing Strategy",
22        "status": "ACTIVE",
23        "network": {
24          "ref": "SM"
25        },
26        "sourcingConditions": [
27          {
28            "name": "deliveryRegionIn",
29            "type": "fc.sourcing.condition.path",
30            "params": {
31              "path": "fulfilmentChoice.address.region",
32              "operator": "in",
33              "value": "Seattle Metro"
34            }
35          }
36        ],
37        "sourcingCriteria": [
38          {
39            "name": "networkPriority",
40            "type": "fc.sourcing.criterion.networkPriority",
41            "params": {
42              "value": [
43                "SM_LS",
44                "SM_WH"
45              ]
46            }
47          },
48          {
49            "name": "locationDistance",
50            "type": "fc.sourcing.criterion.locationDistance"
51          }
52        ]
53      },
54      {
55        "ref": "San_Juan_Islands",
56        "name": "San_Juan_Islands",
57        "description": "San_Juan_Islands Sourcing Strategy",
58        "status": "ACTIVE",
59        "network": {
60          "ref": "SJI"
61        },
62        "sourcingConditions": [
63          {
64            "name": "deliveryRegionIn",
65            "type": "fc.sourcing.condition.path",
66            "params": {
67              "path": "fulfilmentChoice.address.region",
68              "operator": "in",
69              "value": "San Juan Islands"
70            }
71          }
72        ],
73        "sourcingCriteria": [
74          {
75            "name": "networkPriority",
76            "type": "fc.sourcing.criterion.networkPriority",
77            "params": {
78              "value": [
79                "SJI_LS",
80                "SM_WH"
81              ]
82            }
83          },
84          {
85            "name": "locationDistance",
86            "type": "fc.sourcing.criterion.locationDistance"
87          }
88        ]
89      }
90    ],
91    "sourcingFallbackStrategies": [
92      {
93        "ref": "Coastal",
94        "name": "Coastal",
95        "description": "Coastal Strategy Description",
96        "status": "ACTIVE",
97        "sourcingConditions": [
98          {
99            "name": "allProductSizeIn",
100            "type": "fc.sourcing.condition.path",
101            "params": {
102              "path": "unfulfilledItems.product.attributes.byName.size",
103              "operator": "in",
104              "value": [
105                "Extra-Small",
106                "Small"
107              ],
108              "conditionScope": "ALL"
109            }
110          }
111        ],
112        "sourcingCriteria": [
113          {
114            "name": "locationDistanceExclusion",
115            "type": "fc.sourcing.criterion.locationDistanceExlusion",
116            "params": {
117              "value": 50,
118              "valueUnit": "miles"
119            }
120          },
121          {
122            "name": "orderValue",
123            "type": "fc.sourcing.criterion.orderValue"
124          }
125        ]
126      }
127    ]
128  }
129}
1{
2  "data": {
3    "createSourcingProfile": {
4      "id": "333",
5      "ref": "Puget_Sound",
6      "version": 1,
7      "versionComment": "First version of Puget_Sound",
8      "name": "Puget_Sound",
9      "description": "Profile Description",
10      "status": "ACTIVE",
11      "user": {
12        "id": "1302"
13      },
14      "createdOn": "2025-08-18T13:41:40.774Z",
15      "updatedOn": "2025-08-18T13:41:40.774Z",
16      "retailer": {
17        "id": "1"
18      },
19      "defaultVirtualCatalogue": {
20        "ref": "BASE:PS"
21      },
22      "defaultNetwork": {
23        "ref": "PS"
24      },
25      "defaultMaxSplit": 5,
26      "sourcingStrategies": [
27        {
28          "id": "516",
29          "ref": "Seattle_Metro",
30          "sourcingProfile": {
31            "id": "333"
32          },
33          "name": "Seattle_Metro",
34          "description": "Seattle_Metro Sourcing Strategy",
35          "status": "ACTIVE",
36          "priority": 1,
37          "createdOn": "2025-08-18T13:41:40.787Z",
38          "updatedOn": "2025-08-18T13:41:40.787Z",
39          "virtualCatalogue": null,
40          "network": {
41            "ref": "SM"
42          },
43          "maxSplit": null,
44          "sourcingConditions": [
45            {
46              "name": "deliveryRegionIn",
47              "type": "fc.sourcing.condition.path",
48              "params": {
49                "path": "fulfilmentChoice.address.region",
50                "value": "Seattle Metro",
51                "operator": "in"
52              }
53            }
54          ],
55          "sourcingCriteria": [
56            {
57              "name": "networkPriority",
58              "type": "fc.sourcing.criterion.networkPriority",
59              "params": {
60                "value": [
61                  "SM_LS",
62                  "SM_WH"
63                ]
64              }
65            },
66            {
67              "name": "locationDistance",
68              "type": "fc.sourcing.criterion.locationDistance",
69              "params": null
70            }
71          ]
72        },
73        {
74          "id": "517",
75          "ref": "San_Juan_Islands",
76          "sourcingProfile": {
77            "id": "333"
78          },
79          "name": "San_Juan_Islands",
80          "description": "San_Juan_Islands Sourcing Strategy",
81          "status": "ACTIVE",
82          "priority": 2,
83          "createdOn": "2025-08-18T13:41:40.782Z",
84          "updatedOn": "2025-08-18T13:41:40.782Z",
85          "virtualCatalogue": null,
86          "network": {
87            "ref": "SJI"
88          },
89          "maxSplit": null,
90          "sourcingConditions": [
91            {
92              "name": "deliveryRegionIn",
93              "type": "fc.sourcing.condition.path",
94              "params": {
95                "path": "fulfilmentChoice.address.region",
96                "value": "San Juan Islands",
97                "operator": "in"
98              }
99            }
100          ],
101          "sourcingCriteria": [
102            {
103              "name": "networkPriority",
104              "type": "fc.sourcing.criterion.networkPriority",
105              "params": {
106                "value": [
107                  "SJI_LS",
108                  "SM_WH"
109                ]
110              }
111            },
112            {
113              "name": "locationDistance",
114              "type": "fc.sourcing.criterion.locationDistance",
115              "params": null
116            }
117          ]
118        }
119      ],
120      "sourcingFallbackStrategies": [
121        {
122          "id": "315",
123          "ref": "Coastal",
124          "sourcingProfile": {
125            "id": "333"
126          },
127          "name": "Coastal",
128          "description": "Coastal Strategy Description",
129          "status": "ACTIVE",
130          "priority": 1,
131          "createdOn": "2025-08-18T13:41:40.781Z",
132          "updatedOn": "2025-08-18T13:41:40.781Z",
133          "virtualCatalogue": null,
134          "network": null,
135          "maxSplit": null,
136          "sourcingConditions": [
137            {
138              "name": "allProductSizeIn",
139              "type": "fc.sourcing.condition.path",
140              "params": {
141                "path": "unfulfilledItems.product.attributes.byName.size",
142                "value": [
143                  "Extra-Small",
144                  "Small"
145                ],
146                "operator": "in",
147                "conditionScope": "ALL"
148              }
149            }
150          ],
151          "sourcingCriteria": [
152            {
153              "name": "locationDistanceExclusion",
154              "type": "fc.sourcing.criterion.locationDistanceExlusion",
155              "params": {
156                "value": 50,
157                "valueUnit": "miles"
158              }
159            },
160            {
161              "name": "orderValue",
162              "type": "fc.sourcing.criterion.orderValue",
163              "params": null
164            }
165          ]
166        }
167      ]
168    }
169  }
170}

Step arrow right iconVerify your Sourcing Profile

1. Use the `sourcingProfile` query to retrieve a Sourcing Profile by its `ref`.

Sample sourcingProfile Payload
1query sourcingProfile($ref: String!) {
2    sourcingProfile(ref: $ref) {
3        id
4        ref
5        version
6        versionComment
7        name
8        description
9        status
10        user {
11            id
12        }
13        createdOn
14        updatedOn
15        retailer {
16            id
17        }
18        defaultVirtualCatalogue {
19            ref
20        }
21        defaultNetwork {
22            ref
23        }
24        defaultMaxSplit
25        sourcingStrategies {
26            id
27            ref
28            sourcingProfile {
29                id
30            }
31            name
32            description
33            status
34            priority
35            createdOn
36            updatedOn
37            virtualCatalogue {
38                ref
39            }
40            network {
41                ref
42            }
43            maxSplit
44            sourcingConditions {
45                name
46                type
47                params
48            }
49            sourcingCriteria {
50                name
51                type
52                params
53            }
54        }
55        sourcingFallbackStrategies {
56            id
57            ref
58            sourcingProfile {
59                id
60            }
61            name
62            description
63            status
64            priority
65            createdOn
66            updatedOn
67            virtualCatalogue {
68                ref
69            }
70            network {
71                ref
72            }
73            maxSplit
74            sourcingConditions {
75                name
76                type
77                params
78            }
79            sourcingCriteria {
80                name
81                type
82                params
83            }
84        }
85    }
86}
1{
2  "ref": "Puget_Sound"
3}
1{
2  "data": {
3    "sourcingProfile": {
4      "id": "333",
5      "ref": "Puget_Sound",
6      "version": 1,
7      "versionComment": "First version of Puget_Sound",
8      "name": "Puget_Sound",
9      "description": "Profile Description",
10      "status": "ACTIVE",
11      "user": {
12        "id": "1302"
13      },
14      "createdOn": "2025-08-18T13:41:40.774Z",
15      "updatedOn": "2025-08-18T13:41:40.774Z",
16      "retailer": {
17        "id": "1"
18      },
19      "defaultVirtualCatalogue": {
20        "ref": "BASE:PS"
21      },
22      "defaultNetwork": {
23        "ref": "PS"
24      },
25      "defaultMaxSplit": 5,
26      "sourcingStrategies": [
27        {
28          "id": "516",
29          "ref": "Seattle_Metro",
30          "sourcingProfile": {
31            "id": "333"
32          },
33          "name": "Seattle_Metro",
34          "description": "Seattle_Metro Sourcing Strategy",
35          "status": "ACTIVE",
36          "priority": 1,
37          "createdOn": "2025-08-18T13:41:40.787Z",
38          "updatedOn": "2025-08-18T13:41:40.787Z",
39          "virtualCatalogue": null,
40          "network": {
41            "ref": "SM"
42          },
43          "maxSplit": null,
44          "sourcingConditions": [
45            {
46              "name": "deliveryRegionIn",
47              "type": "fc.sourcing.condition.path",
48              "params": {
49                "path": "fulfilmentChoice.address.region",
50                "value": "Seattle Metro",
51                "operator": "in"
52              }
53            }
54          ],
55          "sourcingCriteria": [
56            {
57              "name": "networkPriority",
58              "type": "fc.sourcing.criterion.networkPriority",
59              "params": {
60                "value": [
61                  "SM_LS",
62                  "SM_WH"
63                ]
64              }
65            },
66            {
67              "name": "locationDistance",
68              "type": "fc.sourcing.criterion.locationDistance",
69              "params": null
70            }
71          ]
72        },
73        {
74          "id": "517",
75          "ref": "San_Juan_Islands",
76          "sourcingProfile": {
77            "id": "333"
78          },
79          "name": "San_Juan_Islands",
80          "description": "San_Juan_Islands Sourcing Strategy",
81          "status": "ACTIVE",
82          "priority": 2,
83          "createdOn": "2025-08-18T13:41:40.782Z",
84          "updatedOn": "2025-08-18T13:41:40.782Z",
85          "virtualCatalogue": null,
86          "network": {
87            "ref": "SJI"
88          },
89          "maxSplit": null,
90          "sourcingConditions": [
91            {
92              "name": "deliveryRegionIn",
93              "type": "fc.sourcing.condition.path",
94              "params": {
95                "path": "fulfilmentChoice.address.region",
96                "value": "San Juan Islands",
97                "operator": "in"
98              }
99            }
100          ],
101          "sourcingCriteria": [
102            {
103              "name": "networkPriority",
104              "type": "fc.sourcing.criterion.networkPriority",
105              "params": {
106                "value": [
107                  "SJI_LS",
108                  "SM_WH"
109                ]
110              }
111            },
112            {
113              "name": "locationDistance",
114              "type": "fc.sourcing.criterion.locationDistance",
115              "params": null
116            }
117          ]
118        }
119      ],
120      "sourcingFallbackStrategies": [
121        {
122          "id": "315",
123          "ref": "Coastal",
124          "sourcingProfile": {
125            "id": "333"
126          },
127          "name": "Coastal",
128          "description": "Coastal Strategy Description",
129          "status": "ACTIVE",
130          "priority": 1,
131          "createdOn": "2025-08-18T13:41:40.781Z",
132          "updatedOn": "2025-08-18T13:41:40.781Z",
133          "virtualCatalogue": null,
134          "network": null,
135          "maxSplit": null,
136          "sourcingConditions": [
137            {
138              "name": "allProductSizeIn",
139              "type": "fc.sourcing.condition.path",
140              "params": {
141                "path": "unfulfilledItems.product.attributes.byName.size",
142                "value": [
143                  "Extra-Small",
144                  "Small"
145                ],
146                "operator": "in",
147                "conditionScope": "ALL"
148              }
149            }
150          ],
151          "sourcingCriteria": [
152            {
153              "name": "locationDistanceExclusion",
154              "type": "fc.sourcing.criterion.locationDistanceExlusion",
155              "params": {
156                "value": 50,
157                "valueUnit": "miles"
158              }
159            },
160            {
161              "name": "orderValue",
162              "type": "fc.sourcing.criterion.orderValue",
163              "params": null
164            }
165          ]
166        }
167      ]
168    }
169  }
170}

2. Ensure the Sourcing Profile configuration is correct. Verify values for:

  • The Sourcing Profile itself
  • Primary Sourcing Strategy(ies)
  • Fallback Sourcing Strategy(ies)
  • Sourcing Condition(s)
  • Sourcing Criterion(a)

3. (Optional) Use the `createSourcingProfile` mutation to make corrections if needed.

4. (Optional) Use the `activateSourcingProfile` mutation to activate the updated version after making corrections.

Sample activateSourcingProfile Payload
1mutation activateSourcingProfile($input: ActivateSourcingProfileInput) {
2    activateSourcingProfile(input: $input) {
3        ref
4        version
5        status
6    }
7}
1{
2  "input": {
3    "ref": "Puget_Sound",
4    "version": 2
5  }
6}
1{
2  "data": {
3    "activateSourcingProfile": {
4      "ref": "Puget_Sound",
5      "version": 2,
6      "status": "ACTIVE"
7    }
8  }
9}

Step arrow right iconUpdate your Workflow

Ensure the Sourcing Profile `ref` is specified in the `sourcingProfileRef` parameter for the following Rules:

1{
2  "name": "SourceOrder",
3  "description": "Creates fulfilments at a location based on sourcing profile. If there are unfulfilled items in the order, trigger an event for sourcing from another location to fulfil remaining items",
4  "type": "ORDER",
5  "eventType": "NORMAL",
6  "rules": [
7    {
8      "name": "[[account.id]].order.CreateFulfilmentWithSourcingProfile",
9      "props": {
10        "sourcingProfileRef": "Puget_Sound"
11      }
12    },
13    {
14      "name": "[[account.id]].order.CreatePartialFulfilmentWithSourcingProfile",
15      "props": {
16        "sourcingProfileRef": "Puget_Sound"
17      }
18    },
19    {
20      "name": "{{account}}.order.CreateRejectedFulfilment",
21      "props": {
22        "systemRejectedLocationRef": "RJT_PS"
23      }
24    }
25  ],
26  "triggers": [
27    {
28      "status": "BOOKED"
29    },
30    {
31      "status": "PICK_PACK"
32    }
33  ],
34  "userActions": []
35}