Orders Authorization

In Sana you can create shop accounts for your business customers with different roles - regular customer account, account manager, and sub-account.

Sub-accounts can have limited budget. If a customer with the sub-account role creates a sales document (order or quotation) which exceeds the limit, it must be checked and then either approved or declined by an authorizer.

For more information about shop account roles and order approval workflow in Sana, see Shop Account Roles.

Sales documents (orders or quotations) which are created by sub-accounts and that are waiting for approval (not approved or declined yet) are not shown in the standard Microsoft Dynamics 365 for Finance and Operations tables All sales orders and All quotations. This is because such sales documents must be first checked by the authorizers and either approved or declined in Sana. Until then, sales managers in Microsoft Dynamics 365 for Finance and Operations should not be able to post sales documents which are waiting for approval or declined, but only the approved sales documents.

To see sales documents that are waiting for approval and declined sales documents, in Microsoft Dynamics 365 for Finance and Operations click: Webshop > Common > Webshop orders > Unauthorized orders.

In the Unauthorized orders section, you can see the following tables:

  • Declined sales orders: Orders declined by an authorizer in the Sana webshop are stored here.

  • Pending sales orders: Orders which are waiting for approval (not approved or declined yet) in the Sana webshop are stored here.

  • Declined quotations: Quotations declined by an authorizer in the Sana webshop are stored here.

  • Pending quotations: Quotations which are waiting for approval (not approved or declined yet) in the Sana webshop are stored here.

NOTE

Quotations can be approved and declined only if they are used as the final sales documents in Microsoft Dynamics 365 for Finance and Operations, but not sales orders. The final sales document type can be selected in the Webshops window, in the Order type field. In other cases, if a sub-account places a quotation, it should be first converted to the sales order in the webshop, and only after this it will be possible to approve or decline the order.

If sales managers in Microsoft Dynamics 365 for Finance and Operations try to post the unauthorized or declined order, they will see a warning message.

You can also see the authorization status of the sales document on the E-Commerce FastTab.

Clean Up Declined Documents

Keeping declined documents in Microsoft Dynamics 365 for Finance and Operations leads to stock reservation and accumulation of unnecessary data. Therefore, you can delete declined documents (orders or quotations) to release the reserved stock and remove the unnecessary data.

To delete the declined documents, in Dynamics 365 for Finance and Operations click: Webshop > Periodic > Cleanup documents.

Sana Commerce Cloud uses a batch job to delete declined documents which is the standard Microsoft Dynamics 365 for Finance and Operations approach. Batch processing in 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 according to the schedule. Using the batch job, you can schedule the deletion of declined documents.

The table below provides the description of the fields on the Parameters and Run in the background tabs.

Field  

Description 

Parameters

Period  

Specify the number of days for the system to look back and find the declined documents. All declined orders 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

Enable the Declined option to delete all declined documents.

For more information about other document types, see Draft Orders and Quotations and Clean Up Unpaid Orders.

Webshop 

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

Run in the background

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 declined 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 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 declined documents that are removed by this job and the number of sales lines that are removed for each declined document.