Asynchronous product deletion through the GraphQL API
Major Upgrade
In this release, we are introducing the ability to asynchronously delete products through our GraphQL APIs. This feature enables the deletion of either single or many products through GraphQL while ensuring that all dependencies and associated product data are cleaned up.
π Note: Due to infrastructure limitations, the feature will not be available for some customers. For more information on feature availability, contact your AppDirect technical representative.
Customer impactsβ
- Headless commerce support
Enables complete product lifecycle management through the GraphQL APIs without UI dependency. - Improved reliability
Asynchronous processing ensures deletion operations are resilient to system failures, with automatic retries and comprehensive error tracking. - Data integrity
Guarantees full cleanup of product-related data including pricing, files, variants, and custom attributes. - Operational visibility
Real-time status tracking allows customers to monitor deletion progress and handle errors appropriately in their integrations. - Bulk deletion support
Efficient concurrent processing for large-scale catalog operations. - Validation and safety controls
Comprehensive pre-deletion validation prevents accidental deletion of published products or products in transitional states.
Key changes and enhancementsβ
Aspect | Changes |
---|---|
API access | Introduced GraphQL mutation triggerProductDeletionProcess and query productDeletionProcess . |
Processing model | Asynchronous. |
Validation | Multi-layered validation covering publication status, dependency integrity, and state transitions. |
Data cleanup | Complete removal of product dependencies across all systems (applications, editions, pricing, files, variants, custom attributes). |
Error handling | Structured error responses with specific error types: DuplicateDeletionTriggeredError , InternalServerDeletionError , InvalidDeletionError . |
Process tracking | Process tracking with status transitions (STARTED β DELETING β COMPLETED/ERRORED). |
Bulk support | Accepts multiple product IDs for deletion; processes each with individual tracking. |
Authorization | Role-based access control: ROLE_CHANNEL_ADMIN, ROLE_PARTNER, ROLE_DEVELOPER. |
GraphQL API changesβ
New mutation:β
triggerProductDeletionProcess
- Purpose: Initiates asynchronous deletion for one or more products.
- Input:
- TriggerProductDeletionProcessInput: Includes an array of productIds.
- Response:
- TriggerProductDeletionProcessPayload: Returns process tracking information.
New query:β
productDeletionProcess
- Purpose: Retrieves the status and results of a deletion process by processId.
- Response: Provides real-time status updates and error information.
Validation enhancementsβ
- Products must be unpublished before deletion.
- Products in the publication or unpublication process cannot be deleted.
- Duplicate deletion requests are detected and prevented.
- Permission enforcement based on:
- User role (as defined above)
- Product ownership and access scope
Feature enablement
No feature enablement is required.
Setting enablement
No setting enablement is required.
Documentation
Refer to GraphQL reference documentation.
Was this page helpful?
Tell us moreβ¦
Help us improve our content. Responses are anonymous.
Thanks
We appreciate your feedback!