--- pdfexport: true alias: tutorials-remoteshipping timetoread: true tutorial: full description: "This documentation guides remote material shipment setup and usage between Critical Manufacturing MES instances" --- # Remote Shipping The Remote Shipping functionality is associated with the **Material** and **Container** entities. Its usefulness is visible when there is a need to move or ship **Materials**, and sometimes their **Containers**, from one site to another. !!! note The sites that you use must be connected to each other. This document will guide you through the setup and usage of the Remote Shipping functionality. ## Overview **Remote Shipping** comprises sending **Materials**, and optionally their **Containers**, from one Critical Manufacturing MES instance to another. Critical Manufacturing MES supports **Material** and **Container** loops, in other words, **Materials** and **Containers** that are shipped and then returned to the original sending system. The remote shipping process uses an Integration Entry mechanism through a generic Integration Handler, which is configured to handle Integration Entries with messages related to remote shipping and acknowledgement through the **Process Remote Material Shipment** DEE action (provided out of the box). !!! info For more information, see [[mes-integration]]. ## Remote Shipping Material The remote shipping material process works in the following manner: 1. You must ship the material in Critical Manufacturing MES (similar to the local shipping process). 2. The local Critical Manufacturing MES triggers a new Integration Entry with InTransit **Material**, and optionally **Container**, information. 3. The Integration Entry at the source triggers a new Integration Entry in the target system through a web API based on the remote site information. ## Remote Receiving Material The remote receiving material process works in the following manner: 1. The target Critical Manufacturing MES system reads the information from its Integration Entries. It then creates a temporary remote export object with the **Material**, and optionally **Container**, information. 2. In the Facility View you select a **Material** from the Remote field of Materials to Receive and then select **Receive** on the top ribbon. 3. The **Receive** operation will create a **Material**, and optionally **Container**, for its own remote export object and will trigger an acknowledgement message for the source system by using the Integration Entries mechanism. 4. The source system will receive and terminate the **Material**, and optionally **Container**, when it processes the acknowledgement message. ## Configuring Remote Shipping To configure remote shipping between two Critical Manufacturing MES instances, follow the information below. For the purpose of this tutorial, the following environments were used: * https://source-system.dev * https://target-system.dev ### Target System Ensure that the remote shipping infrastructure is up and running and that there is connectivity between the two different sites. This should include network, firewall and security. Configure the **Site** for the source system (example: AP-Site-01) according to the [[mes-integration#configure-remote-site|Configure Remote Site]] instructions: ![Screenshot showing a remote shipping setup with infrastructure and connectivity requirements.](../../images/remote_shipping_01.png) !!! tip Remote Export Address - This is the URL address when you log on to the system (see the browser address bar). Remote Export Tenant - Tenant name available on the address bar when you are in the login screen of the MES system. Remote Export Token - Token created in the remote environment according to the [[user-guide-security-users#creating-access-tokens-for-a-user|Creating Access Tokens for a User]] instructions. Create a local **Facility** to receive shipped **Materials** with no **Site** associated: ![Screenshot showing a facility creation form with fields for "Facility Name" and "Site".](../../images/remote_shipping_02.png) ### Source System Configure the **Site** for the target system (example: AP-Site-02) according to the [[mes-integration#configure-remote-site|Configure Remote Site]] instructions: ![Screenshot showing a remote facility configuration setup with a previously created site, as per Configure Remote Facility instructions.](../../images/remote_shipping_03.png) Create a remote **Facility** with the previously created **Site** according to the [[mes-integration#configure-remote-facility|Configure Remote Facility]] instructions: ![Screenshot showing a remote facility configuration setup in a source system.](../../images/remote_shipping_04.png) !!! info The remote Facility must have the same name as the corresponding Facility in the target system. In the source system from a local **Facility**, go to the **Shipping Information** section and associate the remote **Facility** to allow shipping: ![Screenshot showing the Shipping Information section in the Source System.](../../images/remote_shipping_05.png) Mark as many **Steps** as intended with the Allow Shipping property. Ship **Material** normally and specify whether **Containers** should also be shipped. !!! info For the Shipping process to succeed, the Product must exist in both the local and remote Facilities. !!! info If the Material has user-defined attributes, they will only be created in the remote Facility if the same attributes (same name and same data type) exist in the remote Facility.