Clean Up Unpaid Orders
You can remove unpaid orders in the Cleanup documents window starting from Sana Commerce Cloud 10.0.30 in Microsoft Dynamics 365 for Finance and Operations.
When a customer creates an order in the Sana webshop and clicks Pay, the sales order will be created in Microsoft Dynamics 365 for Finance and Operations 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 365 for Finance and Operations, 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 for Finance and Operations. Keeping unpaid orders in Dynamics 365 for Finance and Operations 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 unpaid documents, in Microsoft Dynamics 365 for Finance and Operations click: Webshop > Periodic > Cleanup documents.
Sana uses a batch job to delete unpaid documents which is the standard Microsoft Dynamics 365 for Finance and Operations approach. Batch processing in Microsoft Dynamics 365 for Finance and Operations 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. Using the batch job, you can schedule the deletion of unpaid documents.
The table below provides the description of the fields on the Parameters and Run in the background tabs.
Field |
Description |
---|---|
Parameters tab |
|
Period |
Specify the number of days for the system to look back and find the unpaid documents. All unpaid documents stored in Dynamics 365 for Finance and Operations within the specified period of time will be deleted. The cleaning process will start at the moment you click the OK button. |
Document type |
Activate the New option 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. |
Run in the background tab |
|
Batch processing |
Activate this option 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 Dynamics 365 for Finance and Operations click: System administration > Inquiries > Batch jobs. Select the necessary job and click Batch job > Log. In the Message details window 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.