Skip to main content

resetOrganizationData

Requires the permissions settings:organization:update and settings:system:update.

Deletes all of the organization's transactional and seeded data for good, in one step: all of it goes or none. The organization, users, roles, currencies, taxes, units of measure, warehouses, email configuration and appearance are kept. Needs both settings:organization:update and settings:system:update. The reset is audited.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation ResetOrganizationData($confirmationName: String!) {
resetOrganizationData(confirmationName: $confirmationName) {
details
message
success
totalDeleted
}
}

Variables:

{
"confirmationName": "string"
}

Response:

{
"data": {
"resetOrganizationData": {
"details": {},
"message": "string",
"success": true,
"totalDeleted": 0
}
}
}
resetOrganizationData(
confirmationName: String!
): ResetDataResult!

Arguments​

resetOrganizationData.confirmationName ● String! non-null scalar​

The organization's exact name, typed to confirm. Not case sensitive; a mismatch is refused.

Type​

ResetDataResult object​

The result of resetting an organization's data.