Added
B2B Organizations GraphQL: optional status on create mutations
1 days ago
The vtex.b2b-organizations-graphql createOrganization and createOrganizationAndCostCentersWithId mutations now accept an optional status argument.
What has changed?
OrganizationInputandNormalizedOrganizationInputnow accept an optionalstatus: Stringfield, with the same canonical values asupdateOrganization:active,inactive, andon-hold.- Omitting
statuskeeps the historical behavior: the organization is created asactive. - Creating an organization with a non-
activestatus does not trigger the organization status-changed email. That email is sent only for status transitions made throughupdateOrganization.
Why has this changed?
Previously, an organization could only be created as active. Setting any other status required an immediate follow-up updateOrganization call. This added latency and a failure risk to a common B2B onboarding flow for integrations that must start organizations in a non-active state.
What needs to be done?
- No action is required for existing integrations. This change is fully backward compatible.
- To adopt it, pass
statusin the input ofcreateOrganizationorcreateOrganizationAndCostCentersWithId. - Verify the persisted status with
getOrganizationById, not with the mutation response'sstatusfield, which reflects the operation result rather than the organization's lifecycle status.