Delete Unpaid Orders

NOTE

You can remove unpaid orders in the Webshop Documents Cleanup window starting from Sana Commerce Cloud 10.0.30 in Microsoft Dynamics 365 Business Central.

When a customer creates an order in the Sana webshop and clicks Pay, the sales order will be created in Dynamics 365 Business Central 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 Dynamics 365 Business Central, 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 Dynamics 365 Business Central. Keeping unpaid orders in Dynamics 365 Business Central 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.

In Microsoft Dynamics 365 Business Central click on the search button  and enter Webshops. Select your webshop and on the Navigate tab, click Webshop Documents Cleanup.

Sana uses a job to delete unpaid documents which is the standard Dynamics 365 Business Central approach. You can set jobs to run one time, or on a recurring basis. Dynamics 365 Business Central automatically runs the jobs according to the specified schedules for each job queue entry. You can also start, stop, and put a job queue entry on hold manually.

The table below provides the description of the fields on the General and Recurrence FastTabs.

Field 

Description

General FastTab

Webshop ID

The name of the webshop. Unpaid documents created from this webshop will be deleted. 

Remove Documents Older Than the Following Number of Days 

Specify the number of days for the system to look back and find the unpaid documents. All unpaid documents stored in Dynamics 365 Business Central within the specified period of time will be deleted.  

Document Type 

Select the Unpaid document type to delete unpaid documents.

You can also select Draft Declined Unpaid, then all draft, declined and unpaid documents will be deleted.

For more information about draft documents, see Draft Orders and Quotes.

For more information about declined documents, see Orders Authorization.

Recurrence FastTab

On the Recurrence FastTab, you can set up the job to run on a recurring basis. It will automatically delete unpaid documents based on the specified schedule.

  • If you want to run the job manually to delete all unpaid documents, you must enter the number of days in the field Remove Documents Older Than the Following Number of Days and select Document Type on the General FastTab. Then, on the Actions tab, click Delete Documents.

  • If you want to run the job on a recurring basis, set up the schedule on the Recurrence FastTab. Then, on the Actions tab, click Create Job Queue.