> For the complete documentation index, see [llms.txt](https://kb.bevica.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.bevica.com/documentation/integration/bevica_warehouse_integration/warehouse_outbound_document_integration.md).

# Warehouse Outbound Document Integration

Generate and transmit outbound sales and transfer requests to the warehouse.

### Outbound document integration

To manage sending your sales, transfer, and purchase order details to your third-party warehouse, you need to:

{% stepper %}
{% step %}

### Step 1

Link and set up your Bevica Location/s with your third-party warehouse sites.
{% endstep %}

{% step %}

### Step 2

Create sales, transfer, or purchase orders for those locations.
{% endstep %}

{% step %}

### Step 3

Create outbound request records for each order.
{% endstep %}

{% step %}

### Step 4

Transmit those outbound requests to the selected warehouse.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
This service is available with:

* Vision managed warehouses (LCB, Vinotheque, Lanchester, EHD, and Coterie Vaults)
* Culina managed warehouses (Octavian and Great Bear)
* Masterlink
  {% endhint %}

{% hint style="info" %}
Note

If you are sending live files from your production environment, do not also generate and send files from a sandbox environment as these will be treated as live files.
{% endhint %}

### Warehouse integration location setup

Each third-party warehouse has to be set up in Bevica and linked to relevant location code/s. To create the third-party warehouse site:

1. Choose the ![Search (Tell me) icon](https://2932934759-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfUgpGDVvyqBWVvwVIy9a%2Fuploads%2Fgit-blob-d08791d5454211f4ad6c103dcb698478e14f0cc7%2FlkSQid0_R5gHXL6QmCsGIS4HBwZVQYDsmg.png?alt=media) icon, enter **Warehouse Integration Setup**, and then choose the related link.
2. Create a new record for each required warehouse site.

| Field                      | Note                                                                                                                                                           |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Code                       | Create a code for the Warehouse. This can be linked to one or more Locations in Bevica.                                                                        |
| Warehouse Supplier         | Select, from the dropdown list, the third-party warehouse for this site                                                                                        |
| Export Sales Orders        | Determine how Outbound Request, dispatch notifications, records will be created from sales orders. See #1 below.                                               |
| Export Sales Return Orders | Determine how Outbound Request, pre-advices, records will be created from sales return orders. See [#1](#id-1) below.                                          |
| Export Transfer Orders     | Determine how the Outbound Request, dispatch notifications, records will be created from transfer orders. See [#1](#id-1) below.                               |
| Export Purchase Orders     | Determine how the Outbound Request, pre-advices, records will be created from Purchase orders. See Note 1 below. It is recommended these are created manually. |

#### <sup>**#1:**</sup>

* **Disabled:** order files are not created.
* **On Release:** orders that have been released will have outbound requests created automatically.
* **Manually:** you will need to create each request individually from the sales/transfer order or in bulk from the Warehouse Integration Outbound Request page.

To set additional details, select **Card** from the page ribbon.

| Field                                 | Note                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Block Pending Order Re-Open           | Blocks sales orders from re-opening if the warehouse request is Pending.                                                                                                                                                                                                                                                                                                                               |
| Reserves Sub-Accounts Support         | Select this if Paid Reserve sales are to be transferred to sub-accounts. This is only supported by some Vision warehouses. See also Vision Outbound Requests Sales into Reserves section. Please note that if this is not selected, outbound requests will not be created for sales orders which have sales into reserves lines.                                                                       |
| Skip File Generation Check on Posting | Stop any warnings on posting. Please note if you set this when you are sending live orders to the warehouse, you may have instances where the order is posted before the warehouse request is generated. If this happens you will be unable to generate and send the warehouse request as the sales order will no longer exist.                                                                        |
| Do Not Submit Rotations               | When ticked, no rotations are sent on files where a Bevica Reservation has been selected. This relates to Sales and Transfer Orders only. Please be aware the warehouse will reject files if the item and rotation sent on the file do not match what the warehouse have in their system. If you do not submit rotation numbers the warehouse will choose the rotation number.                         |
| Apply Rotation Line No.               | This is only supported by some Vision warehouses. This sets 'Rotation Line No.' with Bevica's 'Rotation Ref.'. Some Vision warehouses use 'Rotation Line No.' to differentiate specific cases/bottles within a Rotation No. receipt, typically on Paid Reserves. Please check with your Vision warehouse that they support using 'Rotation Line No.'. See Apply Rotation Line No. for more information |
| Clear Rotation on New Reserve         | When ticked, rotations are cleared for sales into private reserves so they are not copied over from the originating inventory.                                                                                                                                                                                                                                                                         |
| Prevent Partial Shipment              | If enabled, when a sales order is released, an Outbound Request will only be generated if all inventory item lines are fully reserved. See below.                                                                                                                                                                                                                                                      |
| Field for XML Brand Element           | <p>This field controls if Brand Name or Vendor Name is sent under the 'Brand' section in pre-advice files.</p><p>If left blank, Bevica will prioritise Brand Name and in the absence of Brand Name use Vendor Name. If either Vendor or Brand is populated, Bevica will only use that field.</p>                                                                                                       |

For each Warehouse Integration Setup line, you will need to complete additional information provided by the warehouse, from the page ribbon select **Warehouse Supplier Setup.**

### Warehouse supplier setup

For each Warehouse Integration Setup line, you will need to complete additional information provided by the warehouse. This will be different for each warehouse supplier. From the Warehouse Integration Setup page, select Warehouse Supplier Setup in the ribbon.

* Go to Vision
* Go to Culina
* Go to Masterlink

#### **Vision: For Warehouse Suppliers LCB, Vinotheque, EHD (Vision), Lanchester and Coterie Vaults**

| Field                             | Note                                                                                                                                                                                                                                                                                                                 |
| --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Customer Code                     | Enter your warehouse customer code.                                                                                                                                                                                                                                                                                  |
| Site Code                         | Enter the 2 character site code.                                                                                                                                                                                                                                                                                     |
| Excise Deferment No.              | Enter your excise deferment no.                                                                                                                                                                                                                                                                                      |
| Customs Deferment No.             | Enter your customs deferment no.                                                                                                                                                                                                                                                                                     |
| Records per File                  | This defaults to 1. This must be left at 1 when the File Delivery Method is set to API.                                                                                                                                                                                                                              |
| File Delivery Method              | This will initially be set to Email for you to start the testing process with Vision. Once you have been given the API credentials change this field to API. When you set this to API you must also set up the communication engine route for outbound requests. See Communication Engine Setup.                     |
| From Email Address                | If the file delivery method is set as Email, enter an email address the outbound request file will be sent from. Note that this needs to be an email address set up in Bevica. See Business Central E-Mail Setup.                                                                                                    |
| EDI Email Addresses               | If the file delivery method is set as Email, this is the email address the outbound request files will be sent to. During the testing phase it will be <editest@visionsuite.co.uk>.                                                                                                                                  |
| Outbound FTP Server Code          | Leave this blank.                                                                                                                                                                                                                                                                                                    |
| Inbound FTP Server Code           | Leave this blank.                                                                                                                                                                                                                                                                                                    |
| Client ID                         | If the file delivery method is set to API, populate this with your API client ID or username given to you by Vision.                                                                                                                                                                                                 |
| Client Secret                     | If the file delivery method is set to API, populate this with your API client secret or password given to you by Vision.                                                                                                                                                                                             |
| URL Base                          | If the file delivery method is set to API, populate this with the warehouse address given to you by Vision. You should add http\:// to the beginning of the URL e.g. enter it as <http://kingmoor.lcb.co.uk>.                                                                                                        |
| Delivery Issue E-Mail Address     | This is the email address to notify you that there is an issue with the order. If this is not populated the warehouse will use the recipient list as defined in the warehouse system. If this is populated the email address will be added to the existing recipient list.                                           |
| Add Customer Email Address on SOs | Tick this if you'd like to include customer email addresses on the sales order file. See Contact Name, Phone Number and Email for details of where the email address is taken from. Note that the relevant email field can only contain a single email address otherwise the file will error when sending to Vision. |
| SO Export XMLPort No.             | Populate this field if you have a custom sales order export file format.                                                                                                                                                                                                                                             |
| TO Export XMLPort No.             | Populate this field if you have a custom transfer order export file format.                                                                                                                                                                                                                                          |
| PO Export XMLPort No.             | Populate this field if you have a custom purchase order export file format.                                                                                                                                                                                                                                          |

#### **Culina: For Warehouse Suppliers Octavian and Great Bear**

| Field                    | Note                                                                     |
| ------------------------ | ------------------------------------------------------------------------ |
| Customer Code            | Enter your warehouse customer code.                                      |
| Warehouse Code           | Enter the warehouse code.                                                |
| Excise Deferment No.     | Enter your Excise Deferment No.                                          |
| Records per File         | This defaults to 1.                                                      |
| File Delivery Method     | This defaults as FTP.                                                    |
| Outbound FTP Server Code | Leave this blank.                                                        |
| Inbound FTP Server Code  | Leave this blank.                                                        |
| SO Export XMLPort No.    | Populate this field if you have a custom sales order export file format. |

#### **Masterlink: For Warehouse Supplier Masterlink**

| Field                    | Note                                             |
| ------------------------ | ------------------------------------------------ |
| Customer Code            | Enter your warehouse customer code.              |
| File Delivery Method     | Email or FTP.                                    |
| From Email Address       | Enter the email address files will be sent from. |
| EDI Email Address        | Enter the email address files will be sent to.   |
| Outbound FTP Server Code | Leave this blank.                                |
| Inbound FTP Server Code  | Leave this blank.                                |

### Communication Engine setup

If you are setting this up for a Vision warehouse to send files via the API, once you have completed the warehouse supplier setup card you must also:

* [Initialise the communication engine setup](/documentation/integration/bevica_warehouse_integration/communication_engine_messages.md) if you are not using it for anything else
* Setup a [communication route](/documentation/integration/bevica_warehouse_integration/communication_engine_messages.md) for outbound requests

### Location setup

For each Location which is linked to the Warehouse Integration record you have created, populate the **Warehouse Integration Setup** field on the Warehouse FastTab of the Location card.

### Retention policy setup

### Outbound requests

You can define retention policies to delete outdated data in tables **71303: Warehouse Integration Request** and **71304: Warehouse Integration Request File**. To do this:

{% stepper %}
{% step %}

### Step 1

Choose the ![Search (Tell me) icon](https://2932934759-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfUgpGDVvyqBWVvwVIy9a%2Fuploads%2Fgit-blob-d08791d5454211f4ad6c103dcb698478e14f0cc7%2FlkSQid0_R5gHXL6QmCsGIS4HBwZVQYDsmg.png?alt=media) icon, enter **Retention Policies**, and then choose the related link.
{% endstep %}

{% step %}

### Step 2

Create new records for tables 71303 and 71304, selecting the relevant **Retention Period**.
{% endstep %}

{% step %}

### Step 3

Optionally turn off the **Apply to all records** toggle to set filter criteria to apply the policy to specific data in the table rather than all records.
{% endstep %}
{% endstepper %}

## Communication engine messages

If you are setting this up for a Vision warehouse to send files via the API, you can define a retention policy to delete outdated communication engine messages, see [Communication Engine retention policy setup](/documentation/integration/bevica_warehouse_integration/communication_engine_messages.md).

For more information, see [Retention Policies](https://learn.microsoft.com/en-gb/dynamics365/business-central/admin-data-retention-policies).

### Sending files to the warehouse

### Outbound requests

From the **Warehouse Integration Outbound Request** page, you can generate the Sales, Transfer, and Purchase order details to send to your chosen warehouse. This can either be done manually or via a job queue.

To do this **manually**, from the page ribbon select Process, **Process Requests**. This routine can be used to generate the formatted files and transmit them, by selecting, **Generate Requests** and/or **Send Generated Requests** respectively. The routine's filter section allows you to manage which requests to process.

To do this **via a job queue**:

* Create a job queue entry record for report **71303**
* On the **Report Request** page, populate the **Whse. Integration Setup Code** and toggle on **Generate Requests** and **Send Generated Requests**
* Set the job queue entry to run on relevant days e.g. Monday to Friday
* Set the **Starting Time** and **Ending Time** according to your warehouse cut off times
* Once the job queue has been set up, select **Set Status to Ready**

{% hint style="info" %}
Code (related to the warehouse site) is a mandatory filter on the Process Requests routine.
{% endhint %}

### Communication engine messages

If you are sending files to a Vision warehouse via the API, generating and sending the outbound request will create a message in the communication engine to send to the warehouse, see [Sending outbound requests via the Communication Engine](/documentation/integration/bevica_warehouse_integration/communication_engine_messages.md).

### Checking the Status of outbound requests

Once the requests (and communication engine message if applicable) have been generated/sent, there are several useful fields on the Outbound Request where you can see which warehouse each is for, who created them and when, as well as what point they are in the process. Some of these fields are also available on sales and transfer order pages.

**Request Status**

This field shows the status of the outbound request record and is also available on the sales order page/list, and transfer order page/list.

* **Pending** - the request has been created but the file has not been generated
* **Generated** - the request has been generated by Process Requests
* **Errored** - there was a problem with the file generation. You will be able to view the details in the Request Error Message field
* **Cancelled** - if the request has been created in error it can be cancelled by selecting Cancel Request on the ribbon
* **Sent**
  * If you are using a Vision warehouse and sending the requests via the API, the request will have created a communication engine message
  * If you are using a Vision warehouse and sending the requests via email, or using a different warehouse, the request will have been sent to the warehouse

**Request Last Error Message**

If the outbound request has a Request Status of Errored, the error message will be displayed here.

**Comm. Engine Status**

This is the status of the communication engine message. The field is also available on the sales order page/list and transfer order page/list.

* **Pending** - this is the default status, meaning the Communication Engine has yet to receive a message request or attempted to transmit the message
* **Posted** - file has been successfully sent to Vision
* **Errored** - an error was returned when attempting to send the file to Vision
* **Cancelled** - if the communication engine message has been created in error or should not be sent to the warehouse it can be cancelled, see [cancelling messages](/documentation/integration/bevica_warehouse_integration/communication_engine_messages.md)

**Comm. Engine Error Message**

If the outbound request has a Comm. Engine Status of Errored, the error message will be displayed here. This field is also available on the sales order page.

**Comm. Engine Entry Number**

This is the entry number of the Communication Engine message. It will be 0 if a communication engine message hasn't been created. This field is also available on the sales order page.

\*Fields relating to the communication engine are only relevant if you sending files to a Vision warehouse via the API. See [communication engine routes and messages](/documentation/integration/bevica_warehouse_integration/communication_engine_messages.md).

### Viewing the file created

From the Outbound Request page you can view the file generated by selecting Documents, then **Inspect Request File**. For files sent via the API to a Vision warehouse, you can also view the file from the [communication engine message](/documentation/integration/bevica_warehouse_integration/communication_engine_messages.md).

### Outbound request factbox

The Sales Order page has a factbox that shows any outbound request created for that document and their status.

### Correcting errors

### Outbound requests

If there is an error on the Outbound Request and the sales or transfer order still exists you can make the relevant changes and recreate the outbound request:

* Go to the outbound request page, find the entry relating to the sales or transfer order and select **Cancel Request** in the ribbon twice. This will set the request to Cancelled.
* Go to the sales or transfer order, make the necessary changes, release the order and select Actions, Warehouse, **Add Whse. Request** if an outbound request wasn't created on release. The order will appear as a Pending order in the outbound request list. Process the same as the original request, either manually or via the job queues.

### Communication engine messages

If you are sending files to a Vision warehouse using the API, see [Message Errors](/documentation/integration/bevica_warehouse_integration/communication_engine_messages.md) for details of resolving communication engine error messages.

Once the file has been accepted by Vision, if there are errors at other stages in the process you will receive an email. See details of the [Vision process](https://visionsoftware.atlassian.net/wiki/spaces/VEDI/pages/83951621/Process+and+Response#What-is-the-process).

### Job queues

Occasionally **job queues** can fail so you may have Warehouse Outbound Requests (or Communication Engine Messages if applicable) with a status of Pending. You should check the Job Queue Entries page and restart the job queue/s if this happens. You can run the routines manually if required.

### Purchase Order & Sales Return Order Pre-Advice

Documents are created as normal then, either manually or on a schedule, transmitted to the warehouse.

* **Vision** see [Warehouse Pre-Advice Outbound Notification (Vision)](/documentation/integration/bevica_warehouse_integration/warehouse_pre-advice_integration.md)

### Sales Orders & Transfer Orders dispatch notifications

Sales and transfer orders (documents) are created as normal, although each warehouse may have different requirements and mandatory fields, these are listed on separate pages.

* **Vision** see [Vision Sales & Transfer Outbound Requests](/documentation/integration/bevica_warehouse_integration/vision_sales_and_transfer_outbound_requests.md)
* **Masterlink Parkwest** see [Masterlink Sales Outbound Requests](/documentation/integration/bevica_warehouse_integration/masterlink_sales_outbound_requests.md)
* **EHD** retired (EHD is now managed by Vision)
* **Culina** see [Culina Sales Outbound Requests](/documentation/integration/bevica_warehouse_integration/culina_sales_outbound_requests.md)

{% hint style="info" %}
On a Transfer Order, if both the Transfer-from and Transfer-to location codes have the same value in the Warehouse Integration Setup field, an outbound request will not be generated.
{% endhint %}

Once the document has been created, depending on how you have set up the location on the Warehouse Integration Setup page, a record will be created in the **Warehouse Integration Outbound Request** page.

### Document with multiple locations belonging to the same warehouse site

It is possible to create outbound requests for sales and transfer documents which have different locations on the lines as long as:

* The Location Code in the document header is populated and is linked to a warehouse site (the Warehouse Integration Setup field is populated on the location record)
* The document lines which are for inventory items must have location codes that are linked to the same site

### Re-opening documents

If a document has a **Pending** Warehouse Integration Outbound Request then the user will be warned that the pending request will be cancelled if the integration is set to manual. Users must remember to re-create the outbound request when re-releasing the order. If the integration is automated on release the user will not be warned.

Where an outbound request is **Generated** or **Sent** the document can be re-opened, and the user is issued a warning **'A third party warehouse request for this record has been Generated already'**.

### Deleting documents

If a document has a **Pending** Warehouse Integration Outbound Request, users are able to delete the document, which will delete the outbound request record.

If a document has a **Generated** Warehouse Integration Outbound Request and a user tries to delete the document they will receive an error message. The user will need to cancel the outbound request record before being able to delete the document.

If a document has a **Sent** Warehouse Integration Outbound Request and a user tries to delete the document they will receive an error message.

### Prevent automatic sending of warehouse requests

In some circumstances you may not want to send an individual order to the warehouse automatically. This could be based on Customer or order requirements. This setting stops a warehouse request being created on order release.

On a Customer record turn on the **Whse. Integration Export Manually** flag on the **Warehouse Integration** Fast Tab. When a new sales order is created this will also be set on that sales order.

For any document, irrespective of Customer setup above, you can also set this field on the order itself manually. Or unset it as required. The field can be found on the **Warehouse Integration** Fast Tab on the sales order page.

When you are ready to send the request to the warehouse, from the document page or list, select **Actions > Warehouse > Add Request**. This will generate the outbound request record. You do not need to untick the **Whse. Integration Export Manually** field first.

You can create a saved filter on the sales order and transfer order list pages for the following fields to monitor documents that have the **Whse. Integration Export Manually** field set which have not had a request generated.

* Status = Released
* Whse. Integration Export Manually = Yes
* Whse. Integration Request Status = blank

{% hint style="info" %}
If you are running Add Outbound Orders report you should add the **Whse. Integration Export Manually** field as a filter to ensure they are not included.
{% endhint %}

### Prevent outbound requests being generated if order is partially reserved

If you release a document and not all lines have been fully reserved against Item Ledger Entries you can prevent an outbound request being generated. To do this, on the **Warehouse Integration Setup** record, turn on the **Prevent Partial Shipment** flag. When the document is released, the **Reserved From Stock** Status will be set to Partial and the outbound request will not be generated.

Users should have a filtered sales order or transfer order list for the following fields which they check periodically:

* Status = Released
* Reserved From Stock = Partial
* Whse. Integration Request Status = blank

When stock is receipted, the order can be re-opened and released to reserve the stock and create the outbound request.

{% hint style="info" %}
Outbound Requests can be forced through manually selecting **Add Whse. Request** from the ribbon on the Sales Order page. Selecting **Add Whse. Request** from the Sales Order list will not create outbound requests where Reserved from Stock = Partial.

If you are running Add Outbound Orders report you should add the **Reserved from Stock** field as a filter to ensure they are not included.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://kb.bevica.com/documentation/integration/bevica_warehouse_integration/warehouse_outbound_document_integration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
