Activate Sourcing Profile
Intended Audience:
Technical User
Author:
Kirill Gaiduk
Changed on:
2 Oct 2025
Overview
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`
Key points
- Prerequisites: User should have
`SOURCINGPROFILE_UPDATE`and`SOURCINGPROFILE_VIEW`permissions - Version Control: Activating a new version automatically deactivates the previously
`ACTIVE`version, ensuring that only one Sourcing Profile version remains active at any time
Inputs
The Input fields for activating a Sourcing Profile are defined with the `ActivateSourcingProfileInput`:
Field | Type | Description |
|
| Reference of the Sourcing Profile to activate |
|
| Version number of the Sourcing Profile to activate |
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
- Permissions via its assigned role (e.g.,
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
1mutation activateSourcingProfile($input: ActivateSourcingProfileInput) {
2 activateSourcingProfile(input: $input) {
3 ref
4 version
5 status
6 }
7}1{
2 "input": {
3 "ref": "GLOBAL_DEFAULT",
4 "version": 2
5 }
6}1{
2 "data": {
3 "activateSourcingProfile": {
4 "ref": "GLOBAL_DEFAULT",
5 "version": 2,
6 "status": "ACTIVE"
7 }
8 }
9}