Processing States

Processing states indicate the status of a resource during the import process.

To monitor processing states, you can Query ImportOperations or Get ImportSummary.

Reference resolution

The references of a resource are resolved when, during the asynchronous import process, all the resources referenced by the resource are present in your Composable Commerce Project.

As the Import API does not duplicate the validation logic of other HTTP APIs, a successful reference resolution does not imply the data consistency in your Composable Commerce Project. For example, the uniqueness of a Product Variant's sku cannot be checked by the Import API but only by other HTTP APIs.

ProcessingState

Every Import Operation is assigned one of the following states.

processing

The initial state assigned if the request payload (JSON structure and fields) meets Import API specifications. The resource import is in progress.

validationFailed

Either the request payload is missing the data as per Import API specifications, or even though the references were resolved, the data does not meet validation constraints.

unresolved

The import request contains KeyReferences to resources that do not exist in your Composable Commerce Project.

waitForMasterVariant

Products must have at least one Product Variant, also known as the Master Variant. If you import a Product without a Master Variant, the import request will have this status until another import request includes Master Variant data for the Product.

imported

The resource was successfully imported.

rejected

The resource could not be imported. References were resolved, but the system could not import the data due to an internal server error and the retry limit was reached.

canceled

The import request was canceled and the resource was not imported.

The Import state flow

Successful states

A successful Import Operation goes through the following states:

  • processing: The initial state assigned to a resource if the format (JSON structure and fields) meets the Import API's specifications. This state indicates that the import is in progress.
  • imported: The resource is either created or updated in your Composable Commerce Project. The resource import is completed.

The state unresolved may be temporarily assigned.

Unsuccessful states

An Import Operation in the following states requires your attention:

  • unresolved: Some referenced resources do not currently exist in Composable Commerce. This state is automatically resolved when missing resources are added to your Composable Commerce Project.
  • validationFailed: This state is assigned in two cases:
    • The format (JSON structure and fields) of the data does not meet the Import API's specifications.
    • All the references are resolved. However, the data was not accepted by Composable Commerce because of further validation constraints. You can check the error messages by querying the ImportOperation.
  • rejected: References were resolved, but the system could not import the data due to an internal server error and the retry limit was reached. Some problem with the data is likely to exist which must be addressed before a follow-up Import Request is made. You can check the error messages by querying the ImportOperation. You must retry importing rejected import operations to successfully complete the resource import.

Retrials and Time to live

  • Once all the references are resolved, the system will retry the import operation up to five times.
  • The service deletes Import Operations 48 hours after they are created. Attempting to get an ImportOperation by ID after this period will return an HTTP 404 error.