Lot attribute source mapping

Advanced Attributes  •  Article  •  1/28/2026  • 

The lot attribute source mapping feature defines how lot attribute values and lot attribute requirements are automatically populated from business documents. It allows you to link a lot attributes to a specific field in a purchase order, production order, or sales order, so that the system can copy the relevant value without manual input.

Set up automatic inheritance of lot attribute values

Lot attributes are used to store additional information for lot-tracked items, such as supplier details, order references, or production data. By default, these values must be entered manually when a lot number is assigned.

This feature enables you to configure lot attributes, allowing their values to be automatically inherited from the source document, such as a purchase order or production order. Once configured, the system copies values from the selected document into the corresponding lot attributes at the moment the lot number is assigned, reducing manual entry and improving data consistency.

When a sales order is created through the Aptean Contract Management extension or a released production order is created through the Aptean Shop Floor Production (BC) extension, lot attribute source mapping is not applied. The system does not support automatic inheritance of lot attributes in these scenarios, and values must be reviewed or entered manually if required.

To configure automatic inheritance for a lot attribute, follow these steps:

  1. Open the Lot Attributes page.
  2. Select a lot attribute of a supported type.
    Automatic inheritance can be configured for the following attribute types:

    • Text
    • Integer
    • Decimal
    • Date
    • Lookup

    Option attributes do not support automatic inheritance.

  3. On the action bar, select Source Mapping.
    The Lot Attribute Source Mapping page opens.

  4. Fill in the required field values.
    Each line represents a mapping rule that directs the system where to pick a value from, when to copy it, and which lot attribute it applies to.

    FieldDescription
    Lot Attribute IDSpecifies the unique identifier of the lot attribute. This value is system-assigned and is used internally to link the mapping to a specific lot attribute.
    Lot Attribute NameSpecifies the name of the lot attribute that receives the value. This helps to identify which attribute is being populated from the source document.
    Entry No.Specifies the processing sequence when multiple mappings exist for the same lot attribute and source document. Lower numbers are processed first.
    Lot Attribute TypeSpecifies the data type of the lot attribute, such as decimal, text, integer or date.
    Source DocumentSelect whether the value should be copied from a purchase, released production, or sales order.
    TriggerSelect the required value to define when the system attempts to copy the value. For purchase or released production orders, the On Assign option triggers the mapping when the lot number is assigned on the source document. For sales orders, the On Modify option triggers the mapping whenever the selected field value changes and updates the lot attribute requirement. Note that for sales orders, On Modify is the only available trigger.
    Source Table IDSpecifies the table that provides the source value for the lot attribute. The selected table determines whether the value is taken from the document header or from a document line. The available tables depend on the selected document source:
    • Purchase order: Tables 38 (Purchase Header), 39 (Purchase Line).
    • Production order: Tables 5405, 5406, 337.
    • Sales order: Tables 36 (Sales Header) and 37 (Sales Line).
    Source Table NameSpecifies the name of the source table, such as sales line or sales header, to clarify where the value originates.
    Source Field IDSelect the field whose value should be copied into the lot attribute. The available fields depend on the selected lot attribute type. For example, when the lot attribute is of type Date, it can only be mapped to a field of type Date.
    Source Field NameSpecifies the name of the source field whose value is copied into the lot attribute, such as amount, line no., or order date.
  5. Repeat the steps for other lot attributes, if required.
    When a lot number is assigned to a purchase or production document, the configured lot attributes are filled automatically based on the defined mapping.
    When an item is selected on a sales order line and/or a field value is modified on a sales header or sales line, the lot attribute requirement values are filled automatically based on the defined mappings.

    When copying Date or Decimal values into a Text lot attribute, the value is stored using the language and regional settings of the user who creates the lot. This results in displaying values in a different format, which can lead to incorrect results when filtering or searching on lot attribute values.

Automatic lot attribute assignment on purchase and production orders

To automatically assign lot attribute values on purchase and production orders, follow these steps:

  1. Create a purchase order or production order.
  2. Add a lot-tracked item with a lot attribute template.
  3. Open Item Tracking Lines page.
  4. Assign a new lot number by executing the Assign Lot No. action.
    The system creates the lot and inserts lot attributes based on the item’s lot attribute template.
    When the lot number is created, the system:
    • Skips attributes with fixed values or unsupported types.
    • Copies value from mapped source fields based on the document type.
    • Evaluates attributes with conditions and copies values from the relevant source tables.
    • Stores the values as lot attribute values for the lot.

Lot attributes with fixed values in the item template are not copied from source documents.

Multiple source mappings for a lot attribute

If multiple source mappings are configured for the same lot attribute and source document, the system processes them in a defined order to determine which value to assign.

  • If multiple source mappings are configured for the same lot attribute and the same source document, the system processes them in the Entry No. field value order on the Lot Attribute Source Mapping page.
  • The system attempts to assign the value using the first mapping.
  • If no value is found or the field value is blank, the system continues with the next mapping.
  • When a value is assigned, the system stops further processing for that lot attribute.

For example, if a lot attribute is mapped to the requested receipt date from the purchase header in entry 1, and the planned receipt date from the purchase line in entry 2, then:

  • If the Requested Receipt Date field value is blank in the purchase header, the system attempts to assign the planned receipt date from the purchase line.
  • If a value is found, it is applied, and no further mappings are evaluated.

Automatic lot attribute requirement assignment on sales orders

When you add an item to a sales order line or modify any of the sales order fields (header or line) the system automatically applies sales order-related values as lot attribute requirements. These requirements restrict lot selection so that only lots matching the required characteristics can be assigned to the sales line.

Field values such as Planned Delivery Date and Customer City are inherited from the sales order and enforced during lot assignment.

Automatic creation of lot attribute requirements

When an item is inserted on a sales order line, the system:

  • Creates lot attribute requirement records based on the item’s lot attribute template.
  • Evaluates each applicable lot attribute individually.

The system automatically sets the following values:

  • The Production Date field value is updated with the planned delivery date from the sales line.
  • The Customer City field value is updated with the sell-to city from the sales order header.

Restrictions after lot assignment

After a lot is assigned to the sales line, it is no longer possible to change the lot attribute requirement values, as they might conflict with the lot attributes of already assigned lots. This is an existing business rule in the Aptean Advanced Attribute extension that also applies to lot attributes that have source mapping set up. If a lot number is already assigned in the tracking of a sales order, and the user would modify a field that is set up as a source mapping, an error is displayed indicating the lot number should be removed from the tracking line.

  • Source mapping is applied when a sales order is created from contracts, quotes, and blanket orders.
  • The On Modify trigger on the Lot Attribute Source Mapping page only updates a lot attribute requirement when the requirement value is initially empty and is populated for the first time.
  • If the requirement already contains a value, subsequent changes to the source document field do not update the lot attribute requirement automatically.