Table of Contents

Create return order - Code: CREATE RETURN ORDER

General

This page describes the CREATE RETURN ORDER function of the TMS Irreg Resolution Functions function set. Use it in a step on an irregularity to send the goods of an order back, for example after a refused delivery.

When the function runs, it does the following for every section that's linked to the irregularity as a cause:

  1. Creates a new order as a copy of the original order, with the loading and unloading addresses switched. The copy gets the loading and unloading dates and times you specify.
  2. Copies the carriers and the comments of the original order to the new order. The original and the new order are linked to each other.
  3. Optionally sets a status on the original section.
  4. Optionally updates the status of the irregularity.

The new order is added to the irregularity as a result.

The irregularity must be linked to an order. If it isn't, the function stops with an error.

Choose the order type

Use RETURN ORDER TYPE to give the return order a specific order type, for example one that you use for returns. When you leave it empty, the return order gets the order type of the original order.

Leave status parameters empty

CXL STATUS and IRR. RESOLVED STATUS are optional. When you leave a status parameter empty, the function skips that status update. The reason code and reason description only apply when CXL STATUS is filled in.

Parameters

The following parameters are applicable on this function.

Name Value Description
RETURN ORDER TYPE An order type. Optional. The order type of the return order. Default: the order type of the original order.
LOADING DATE Date. The loading date of the return order.
LOADING TIME FROM / LOADING TIME TO Time. The loading time window of the return order.
UNLOADING DATE Date. The unloading date of the return order.
UNLOADING TIME FROM / UNLOADING TIME TO Time. The unloading time window of the return order.
CXL STATUS A status code. Optional. The new status of the original section.
CXL REASON CODE / CXL REASON DESCR. Reason code / free text. Optional. The reason stored with the status change.
IRR. RESOLVED STATUS A status code. Optional. The new status of the irregularity.