Sales Document Attachments

WATCH THE VIDEO

Having document attachments in your webshop is a great way to enhance your customers experience.

Sana Commerce Cloud supports two types of attachments for sales documents:

  • Attachments which customers can add to the sales orders during the checkout process.

  • Attachments which sales managers can add to different sales documents in Microsoft Dynamics AX and show them in the webshop.

Sales Document Attachments Added by Sales Managers in Microsoft Dynamics AX

In Microsoft Dynamics AX it is possible to attach different files and add links to sales documents. You can add attachments to all types of sales documents – orders, quotations, invoices, return receipts, credit notes and shipments.

NOTE

Sana supports only attachments added to the sales document header but not to the sales document lines.

The maximum file size that can be sent from Microsoft Dynamics AX to Sana via the Web service is 18MB.

Files and links added to the sales documents in Microsoft Dynamics AX are shown on the sales document details pages in the Sana webshop.

If you need to provide your business customers with some additional documentation, for example a waybill or a copy of some extra documents, they can be attached to the corresponding sales document in Microsoft Dynamics AX and shown on the sales document details page in the Sana webshop.

NOTE

Sana also provides a possibility to attach files to sales documents using File manager in Sana Admin. For more information, see Sales Document Attachments.

Set Up Document Types and Document Handling

Step 1: Specify the location where the sales document attachment files will be stored.

In Microsoft Dynamics AX click: Organization administration > Setup > Document management > Document types.

In the Document types window, you can create document types for files and URLs and specify the location where these files should be stored.

The following locations are available:

  • Archive directory - files are stored in the directory specified in the Archive directory field.

  • Database - files are stored in the Microsoft Dynamics AX database.

  • Original location - files are stored in the location that was used when the file was originally attached to the record.

Step 2: Set up general document management parameters.

In Microsoft Dynamics AX click: Organization administration > Setup > Document management > Document management parameters. On the General tab, set up document handling.

The table below provides description of the fields:

Field

Description

Archive directory

The default archive directory location. If you do not specify the archive directory path while creating document types for the files, this one will be used.

Max. file size in database

Enter the maximum file size, in megabytes, for a file that is saved to the Microsoft Dynamics AX database.

Max. file size in file system

Enter the maximum file size, in megabytes, for a file that is saved to the archive directory location.

NOTE

If your Sana webshop is connected to Microsoft Dynamics AX 2009 via Application Integration Framework (AIF) there might be issues with the file size limit, for example not enough memory to retrieve the file. If you encounter any problems with attachments, check AIF exceptions in Microsoft Dynamics AX 2009: Basic > Periodic > Application Integration Framework > Exceptions.

For more information, see Configure document management.

Add Attachments to a Sales Document

Open the necessary sales document, for example a sales order and click Attachments, on the Sales order tab.

To add an attachment to a sales document, click New in the Document handling window of a sales document. Select the type of attachment that you have previously created in the Document types window and upload the file or enter the URL.

To show attachments in the Sana webshop, on the General tab, select the Visible in webshop checkbox for an attachment.

Enable Sales Document Attachments

Step 1: In Microsoft Dynamics AX click: Webshop > Common > Webshops.

Step 2: Open the webshop and on the General FastTab, you can enable sales document attachments.

Select the checkbox Enable document attachment downloads to show all files and URLs added to the sales documents in Microsoft Dynamics AX on the sales document details pages in the Sana webshop.

NOTE

When there is no connection to the ERP system and the webshop is in the maintenance mode only URL attachments will be available in the webshop. It will not be possible to open the attached files until the connection to ERP is re-established.

Attachment of Files to the Sales Documents by Customers During Checkout

NOTE

Applies to: Sana Commerce Cloud 10.0.83 and higher in Microsoft Dynamics AX

Some business owners can provide their customers with customization services. For example, you are selling t-shirts in your webshop and you can personalize any t-shirt at the customer’s request. In this case the possibility to upload files during checkout can come in handy, since a customer can create the custom t-shirt design and upload the file with the design during checkout, instead of contacting you via email or other means of communication.

Having the file upload in the checkout takes the interaction between you and your customers to the next level and improves user experience for shoppers.

NOTE

Attachments added by customers during checkout are supported by sales orders and sales quotes.

A file added to the sales order by a customer during the checkout process is shown on the sales order details page in the Sana webshop.

When a customer adds a file to the sales order, this file is stored in the file system of Sana Commerce Cloud. Also, the URL to the attachment is saved to the sales order attachments in Microsoft Dynamics AX. The Microsoft Dynamics AX user can click on the URL and the attachment will be automatically downloaded.

You can find all files attached to the sales orders at the following location in File manager: Root > Documents > sales document attachments > order. Each folder inside the order folder corresponds to a specific sales order by its ID.

Good to Know

  • When a customer edits an order or a quote with an attachment, an attachment is shown in the last checkout step in the webshop, but a customer cannot edit it. A modified order or a quote is saved to Microsoft Dynamics AX together with an attachment.

  • When a customer converts a quote with an attachment to a sales order, an attachment is transferred to a sales order. It does not matter which conversion type is used, With checkout or Unattended, an attachment will be transferred to a sales order in any case. If the With checkout conversion type is used, an attachment is shown on the last checkout step in the webshop, but a customer cannot edit it.

Enable and Disable Sales Order Attachments

You can change the visibility of the Attachments area in the Sana webshop using the checkout header fields in Sana Admin.

In Sana Admin click: Setup > Ordering > Checkout header fields. Edit the Attachments field. The Attachments field is available on the Checkout header fields tab in Sana Admin by default and you cannot remove it. But you can hide this field if you don't want your webshop customers to be able to add attachments to sales orders. You can also set the accepted file types, maximum file name length, maximum file size, etc.

Sales Order Attachments in Microsoft Dynamics AX

The link to the attachment added by a customer during checkout is saved to the sales order in Microsoft Dynamics AX. To see the attachment link, open the necessary order and click the Attachments button on the Sales order tab. The Microsoft Dynamics AX user can click on the link and the attachment will be automatically downloaded.