Demand Planning

Demand transactions, demand events, imported forecasts, leading indicator inputs and calendar overrides: what each represents and what identifies a record.

These subjects feed the GAINS forecast: the sales history and open orders it forecasts from, the events that shift demand, forecasts you produce yourself, external indicators, and the calendar each location works to. This page describes what each represents, what identifies a record, and how records nest. The endpoints, task types and extended data support are listed in Inbound Subjects; the API Reference lists every field.

All of these subjects refer to SKUs, locations, SKU-locations or customers, so load that master data first; see Initial Load & Load Order.

What identifies a record

SubjectIdentified by
Demand transactionsOrderNumber, LineNumber, ItemCode, IdealShipFromLocationCode, CustomerRequestDate and CustomerShipToCode
Demand eventsEventId
Imported forecastsItemCode and LocationCode; each forecast by its GeneratedOn
Leading indicator inputsItemCode, LocationCode and Channel
Calendar overridesDaily and weekly: LocationCode and OverrideType. Monthly: LocationCode, StartDate and EndDate

Demand transactions

Sales order lines: both shipped history and open orders. One record is an order header, with its lines under LineItems. Loaded with POST /demand-transactions; use POST /demand-transactions-splits when a line is split across dates or lots, and each line then carries its splits under SplitItems.

A header carries the values its lines share, and a line overrides them where it differs. Fields that a line can override are marked "(Line Override)" in the API Reference. A value that identifies the line, such as the ship-from location or the request date, must be known for every line: set it on the header, or on every line.

[
  {
    "IdealShipFromLocationCode": "CHI01",
    "ActualShipFromLocationCode": "CHI01",
    "CustomerRequestDate": "2026-05-22",
    "OrderEntryDate": "2026-05-18",
    "OrderNumber": "SO-100482",
    "CustomerShipToCode": "ST-01",
    "CustomerCode": "C-10452",
    "LineItems": [
      {
        "ItemCode": "ASM-7701",
        "RequestedQuantity": 40,
        "ShippedQuantity": 40,
        "SalesPrice": 18.75,
        "LineNumber": "1",
        "OrderType": 0,
        "Status": "03"
      },
      {
        "ItemCode": "ASM-7702",
        "CustomerRequestDate": "2026-05-29",
        "RequestedQuantity": 12,
        "LineNumber": "2",
        "OrderType": 0,
        "Status": "00"
      }
    ]
  }
]

The second line overrides the header's CustomerRequestDate.

Deleting a demand transaction

A delete names a transaction by the same fields as the load, but requires only OrderNumber, IdealShipFromLocationCode and CustomerRequestDate: a transaction can be loaded without a line number or a ship-to code, so the delete cannot insist on them. LineNumber, ItemCode and CustomerShipToCode complete the key. Send the delete with every identifying value you loaded, so that it names exactly the line you mean.

Send OrderNumber and LineNumber on every transaction you may need to delete. A delete cannot name a transaction loaded without an order number.

Demand events

Promotions and other events that change demand for SKU-locations over a period. One record is an event, with the SKU-locations it affects under Details. Loaded with POST /demand-events.

Imported forecasts

A monthly forecast you produce outside GAINS, per SKU-location. Records nest as item → Locations → ForecastBuckets, one bucket per month. GeneratedOn tells apart the forecasts you send for the same SKU-location. A delete takes only ItemCode and LocationCode, and removes the imported forecasts of that SKU-location. Loaded with POST /forecasts.

Leading indicator inputs

Values of an external indicator, by period, which GAINS uses in leading indicator analysis. Use POST /lia-input/weekly or POST /lia-input/monthly to match your indicator's periods. Records nest as item → Locations → Inputs.

Calendar overrides

Exceptions to a location's working calendar: days it does, or does not, receive, ship, produce, release or deliver. A daily override changes one date; a weekly one changes days of the week over a period; a monthly one changes days of the month over a period, each with its own endpoint. One flat record per override:

[
  {
    "LocationCode": "CHI01",
    "OverrideType": "E",
    "Description": "No Saturday receiving June to August",
    "StartDate": "2026-06-01",
    "EndDate": "2026-08-31",
    "ModifiedSchedule": ["saturday"],
    "AppliesTo": ["receive", "delivery"]
  }
]

Related


Did this page help you?