Published at: 2025-10-30

Outbound Order


1. Business Scenario Example

As a key part of inventory, sales, and procurement management, outbound operations (such as sales, loans, or scrapping) require selecting a specific Warehouse for goods to be issued from. When creating an Outbound Order, first choose the Warehouse, then select Products to be issued from that Warehouse’s Inventory list, set the quantity for each Product, and generate the Outbound Order. Like Inbound Orders, outbound operations can be configured to require an approval workflow before items leave the Warehouse. Managing Outbound Orders helps administrators track product sales and outbound activities.

2. Create a New Outbound Order

picture coming soon:

  • Go to CRM and open Outbound Orders to access the Outbound Order list.
  • Click the New button at the top right to create an Outbound Order using either a preset Record Type or a custom Record Type.

picture coming soon:

  • When creating an Outbound Order, fill in the Warehouse (the issuing Warehouse), Record Type, and other required fields.
  • You can add Outbound Order Products from Inventory, Batch Inventory, or Serial Numbers.
  • When you choose Add from Inventory, the system opens the Inventory object list filtered by the selected Warehouse and shows only Inventory records with quantity > 0 for that Warehouse. After selecting Inventory, enter the outbound quantity. For Products managed by batch or serial control, you must also specify the batch or serial numbers to be issued.
  • When you choose Add from Batch Inventory, the system opens the Batch Inventory list filtered by the selected Warehouse and shows only batch records with quantity > 0 for that Warehouse. After selecting a batch, the system auto-populates the chosen batch, the associated Product, and batch inventory details into the Outbound Order product lines—you only need to enter the quantity.
  • When you choose Add from Serial Numbers, the system opens the Serial Number list filtered by the selected Warehouse and excludes Serial Numbers with status “Allocated” or “Used.” After selecting Serial Numbers, the system auto-populates the selected serial(s) and the corresponding Product into the Outbound Order product lines; the quantity for each serial-numbered line is fixed at 1.
  • On submission, the system validates the selected Warehouse’s Inventory; if Inventory is insufficient, the submission fails validation.
  • When the Outbound Order is confirmed, the system deducts the actual Inventory from the issuing Warehouse.

3. System-Automated Creation of Outbound Orders

An Outbound Order is both a business document and a system-level record. Any business operation that reduces Inventory will ultimately map to an Outbound Order. The system automatically generates Outbound Orders to reduce Inventory for scenarios including, but not limited to:

  • Transfer Order: After a Transfer Order is confirmed, the system automatically generates an Outbound Order with Record Type “Transfer Out.”
  • Inventory Check Sheet: If an Inventory Check identifies Inventory Loss, clicking Generate Inventory Loss Outbound Order creates an Outbound Order with Record Type “Inventory Loss Outbound.”
  • Shipping Order: After a Shipping Order is confirmed, the system automatically generates an Outbound Order with Record Type “Sales Outbound.”
  • Spare Parts Consumption: When spare parts are issued from the spare parts Warehouse and the consumption is confirmed, the system generates an Outbound Order of the “Spare Parts” Record Type.
  • Custom Objects: If a custom object should deduct Inventory, it can create an Outbound Order (manually or via function) and link it to the appropriate Warehouse to reduce Inventory.

4. Inventory Validation Function Configuration Guide

Configure a custom function as a pre-approval check to prevent downstream documents from being invalidated due to insufficient actual Inventory.

Applicable documents include: Transfer Orders, Outbound Orders, and Purchase Return Orders.

1) Navigate to the Custom Function management page

picture coming soon:

2) Click New Function at the top right and enter the configuration in the popup:

picture coming soon:

picture coming soon:

  • You can customize Function Name and API Name. Select namespace “Validation Function,” set the return type to “ValidateResult,” and bind the function to the Transfer Order object (Outbound Orders and Purchase Return Orders are also applicable).
  • After proceeding to the next step, copy and paste the following script into the function editor and save to create the validation function:

          Map requestParam = [
              "dataId":context.data._id,
              "apiName":context.data.object_describe_api_name
          ];
          Fx.log.info("requsetParam=" + requestParam)
          def ret = Fx.proxy.callAPI("stock.flowCompletedCheckStock", null, requestParam)
          Fx.log.info("ret=" + ret)
          HttpResult data = ret.data as HttpResult
          if(null == data) {
              return "Network timeout, please try again later"
          }
          def Map result = data.content as Map
          Fx.log.info("result=" + result)
          String msg = "Validation succeeded";
          Boolean isSuccess = true;
          if(result == null || !result['result']['isSuccess']) {
              msg = result['result']['message']
              isSuccess = false
          }
          def validateResult = ValidateResult.build{
              success = isSuccess
              errorMessage = msg
          }
          return validateResult
    

3) Configure the custom function as a precondition in the approval node of the workflow

picture coming soon:

picture coming soon:

  • Set the precondition type to “Based on Custom Function” and select the function you just created.
Submit Feedback