Clean Up Unpaid Orders

NOTE

You can remove unpaid orders in the Cleanup documents window starting from Sana Commerce Cloud 10.0.30 in Microsoft Dynamics AX.

When a customer creates an order in the Sana webshop and clicks Pay, the sales order will be created in Microsoft Dynamics AX and the customer will be redirected to the payment provider page to enter payment details, such as the credit card number, and to finalize the payment. At this moment, the payment status is New in Microsoft Dynamics AX, until the payment is finalized.

If a customer does not finalize the payment on the payment page and closes the Web browser or tab, the sales order will remain with the status New in Microsoft Dynamics AX. Keeping unpaid orders in Microsoft Dynamics AX leads to stock reservation and accumulation of unnecessary data. Therefore, you can delete unpaid orders which are stored for a long time and are not finalized by the customers to release the reserved stock and remove the unnecessary data.

To delete the unpaid documents, in Microsoft Dynamics AX click: Webshop > Periodic > Cleanup documents.

Sana uses a batch job to delete unpaid documents which is the standard Microsoft Dynamics AX approach. Batch processing in Microsoft Dynamics AX enables you to run specific tasks as batch jobs, schedule and define the conditions under which the batch jobs are executed, add the jobs to a queue, and set them to run automatically according to the schedule. Using the batch job, you can schedule the deletion of unpaid documents.

The table below provides the description of the fields on the General and Batch tabs.

Field  

Description 

General tab

Period

Specify the number of days for the system to look back and find the unpaid orders. All unpaid orders stored in Microsoft Dynamics AX within the specified period of time will be deleted. The cleaning process will start at the moment you click the OK button.

Document type

Select the New checkbox to delete all unpaid documents.

For more information about other document types, see Draft Orders and Quotations and Orders Authorization.

Webshop 

Select the webshop. Unpaid documents created from the selected webshop will be deleted. 

Batch tab

Batch processing 

Select this checkbox to enable the batch job. 

Task description

The Cleanup documents task is used by default. 

Batch group 

Select the batch group to run the batch job as part of a batch group. Batch groups are used to group and run jobs on a specific batch server.

Private 

A private job does not run automatically, and can be run only by the user who scheduled it. 

Recurrence 

Specify how frequently the batch job for deleting unpaid documents should run. 

Alerts 

Set up alerts for the batch job. 

Logs

Using Log, you can see more information about what the Cleanup documents job is doing.

In Microsoft Dynamics AX click: System administration > Inquiries > Batch jobs > Batch jobs. Select the necessary job and click Log. You will see all unpaid orders that are removed by this job and the number of sales lines that are removed for each unpaid order.