Webhook Payload Samples

The payload GAINS Connect sends for each webhook trigger: orders, production orders, inventory policy, forecast and task status.

This page shows the payload GAINS Connect sends for each webhook trigger, and the conventions every payload follows. How to configure a webhook, its triggers and its filters is described in Webhooks.

Payload format

Every payload has the same envelope: DataType names the subject and Data holds the records. How the request itself arrives is described in Receiving Webhooks.

  • Data is always an array, even when it holds a single record.
  • Dates are YYYY-MM-DD and timestamps YYYY-MM-DD HH:MM:SS, in the GAINS server timezone.
  • ExtendedData, marked // optional in the samples, holds your own attributes. Which levels carry it, and how missing values are sent, is described in Extended Data - Outbound. It is never sent on TaskStatusUpdate.
  • Field names are PascalCase by default. A destination configured with CAMEL_CASE receives the same structure and values with camelCase names (dataType, data, lineItems, itemCode). Values such as purchase_order and Completed are not affected.

Orders

The POSubmit, TOSubmit and WOSubmit triggers issue a webhook when replenishment orders are submitted in GAINS, automatically by the Order Auto Submit job or by a user in the GAINS UI.

All three order triggers share one structure: an order header carrying the shipping and receiving locations, the dates and the address block, with a LineItems array beneath it. The line items are identical across the three. A transfer order's header carries SenderName in place of VendorName, and its DataType is transfer_order; a work order's is work_order. The sample below is a purchase order.

{
  "DataType": "purchase_order",
  "Data": [
    {
      "TrackingNumber": 4821,
      "ShippingLocation": "ACME",
      "ReceivingLocation": "CHI01",
      "VendorName": "Acme Supplies",
      "ReleaseDate": "2026-05-21",
      "RequestedDeliveryDate": "2026-06-21",
      "SubmittedBy": "[email protected]",
      "UpdatedTime": "2026-05-21 11:00:00",
      "Documentation": "Consolidated weekly replenishment order.",
      "ContactName": "John Doe",
      "ContactEmail": "[email protected]",
      "ShipMethod": "land",
      "Address1": "123 Any St",
      "Address2": "Suite 400",
      "Address3": "Dock 7",
      "City": "Chicago",
      "State": "IL",
      "PostalCode": "60601",
      "Country": "US",
      "LineItems": [
        {
          "ItemCode": "938939",
          "ItemDescription": "Widget Small",
          "Quantity": 480,
          "QuantityUnadjusted": 462,
          "Cost": 10.0,
          "LineComment": "Rounded up to pallet quantity",
          "ShippingLocation": "ACME",
          "ReceivingLocation": "CHI01",
          "OrderNumber": "PO-2026-004821",
          "OrderType": "REPLEN",
          "ReceiveDate": "2026-06-21",
          "DeliveryDate": "2026-06-19",
          "LineNumber": "1",
          "BuyerCode": "Jack",
          "ApprovalCode": "U",
          "ApprovedBy": "finley",
          "PreOrderCarryCost": 112.4,
          "DaysOverLeadTime": 0.0,
          "Weight": 1.85,
          "Volume": 0.02,
          "ConversionFactor": 12.0,
          "BundleCode": 3,
          "ExtendedData": {                // optional - line item level
            "CustomerInternalId": "REQ-88230",
            "CostCentre": "MTN-01"
          }
        }
      ],
      "ExtendedData": {                    // optional - order header level
        "SourceSystemOrderId": "ERP-55120"
      }
    }
  ]
}

Production orders

The ProductionOrderSubmit trigger issues a webhook when production orders are submitted in GAINS. The payload is the same as GET /replenishment/production-orders, without Paging.

A production order groups the production runs submitted under one TrackingNumber.

{
  "DataType": "production_order",
  "Data": [
    {
      "TrackingNumber": 4830,
      "ProductionLine": "LINE-A",
      "ReceivingLocation": "PLANT-02",
      "SubmittedBy": "jdoe",
      "UpdatedTime": "2026-05-22 08:15:09",
      "RequestedDeliveryDate": "2026-06-05",
      "Documentation": "Weekly production plan.",
      "ContactName": "Priya Raman",
      "ContactEmail": "[email protected]",
      "ShipMethod": "INTERNAL",
      "Address1": "4 Foundry Lane",
      "Address2": "Unit 5",
      "Address3": null,
      "City": "Toledo",
      "State": "OH",
      "PostalCode": "43604",
      "Country": "US",
      "LineItems": [
        {
          "ItemCode": "ASM-7701",
          "ItemDescription": "Hub assembly, front",
          "ProductionLine": "LINE-A",
          "ReceivingLocation": "PLANT-02",
          "Quantity": 240,
          "QuantityUnadjusted": 236,
          "Cost": 62.1,
          "ReleaseDate": "2026-05-25",
          "ScheduledStartDate": "2026-05-27",
          "StartDateUnadjusted": "2026-05-26",
          "ScheduledEndDate": "2026-05-29",
          "ReceiveDate": "2026-05-30",
          "DeliveryDate": "2026-06-01",
          "NeedDate": "2026-06-02",
          "LineNumber": "1",
          "RouteSequence": 10,
          "WorkCenter": "WC-PRESS-1",
          "OrderNumber": "NONE",
          "ApprovalCode": "U",
          "ApprovedBy": "jdoe",
          "BuyerCode": "P07",
          "LineComment": null,
          "PreOrderCarryCost": 412.75,
          "DaysOverLeadTime": 0.0,
          "Weight": 6.2,
          "ConversionFactor": 1.0,
          "Cag": "HUBS",
          "BundleCode": 3,
          "ExtendedData": {                // optional - line item level
            "CostCentre": "MTN-03"
          }
        }
      ],
      "ExtendedData": {                    // optional - order header level
        "SourceSystemOrderId": "ERP-55190"
      }
    }
  ]
}

Inventory policy

The InventoryPolicyUpdate trigger issues a webhook when GAINS detects that one of the attributes below has changed since the previous run. The change can come from a user action in the GAINS UI or from a system process.

The attributes watched for a change are:

  • AdjustedOrq
  • MinimumOrq
  • IncrementalOrq
  • Rsq
  • RsqOverride
  • CalcSs
  • AdjustedSs
  • SsOverride
  • ServiceLevel
  • ServiceLevelMinimum
  • InventoryClass
  • StockIndicator
  • LeadTime
{
  "DataType": "inventory_policy",
  "Data": [
    {
      "ItemCode": "938939",
      "ItemDescription": "Widget Small",
      "Locations": [
        {
          "LocationCode": "CHI01",
          "LocationName": "Chicago Central Warehouse",
          "InventoryPolicy": {
            "AdjustedOrq": 480,
            "MinimumOrq": 120,
            "IncrementalOrq": 12,
            "CalcOrq": 462,
            "Rsq": 60,
            "RsqOverride": 55,
            "CalcSs": 210,
            "AdjustedSs": 216,
            "SsOverride": 200,
            "ServiceLevel": 0.975,
            "ServiceLevelMinimum": 0.95,
            "InventoryClass": "A",
            "StockIndicator": "S",
            "LeadTime": 3.5,
            "ForecastError": 42.18,
            "AvgLTTotalDemand": 385
          },
          "ExtendedData": {                // optional - location level
            "PlannerCode": "PL-07"
          },
          "EventOccurredAt": "2026-05-21 02:15:44"
        },
        {
          "LocationCode": "DC-EAST",
          "LocationName": "East Regional Distribution Center",
          "InventoryPolicy": {
            "AdjustedOrq": 240,
            "MinimumOrq": 60,
            "IncrementalOrq": 12,
            "CalcOrq": 233,
            "Rsq": 24,
            "RsqOverride": 30,
            "CalcSs": 96,
            "AdjustedSs": 96,
            "SsOverride": 90,
            "ServiceLevel": 0.96,
            "ServiceLevelMinimum": 0.95,
            "InventoryClass": "B",
            "StockIndicator": "S",
            "LeadTime": 2.0,
            "ForecastError": 18.05,
            "AvgLTTotalDemand": 140
          },
          "ExtendedData": {                // optional - location level
            "PlannerCode": "PL-12"
          },
          "EventOccurredAt": "2026-05-21 02:15:44"
        }
      ],
      "ExtendedData": {                    // optional - item level
        "ProductFamily": "BRAKING"
      }
    }
  ]
}

Forecast

The ForecastWeeklyUpdate and ForecastMonthlyUpdate triggers issue a webhook when GAINS detects that the forecast has changed since the previous run. The change can come from a user action in the GAINS UI or from a system process.

The weekly and monthly triggers publish the same structure under the same DataType - only the bucket boundaries differ. If you subscribe to both, distinguish them by the length of the period each bucket covers.

{
  "DataType": "forecast",
  "Data": [
    {
      "ItemCode": "938939",
      "Locations": [
        {
          "LocationCode": "CHI01",
          "InventoryClass": "A",
          "ForecastBuckets": [
            {
              "ForecastPeriodNumber": 1,
              "ForecastPeriodStart": "2026-05-25",
              "ForecastPeriodEnd": "2026-05-31",
              "ForecastQuantityTotal": 118,
              "ForecastQuantityTotalRaw": 112
            },
            {
              "ForecastPeriodNumber": 2,
              "ForecastPeriodStart": "2026-06-01",
              "ForecastPeriodEnd": "2026-06-07",
              "ForecastQuantityTotal": 124,
              "ForecastQuantityTotalRaw": 119
            },
            {
              "ForecastPeriodNumber": 3,
              "ForecastPeriodStart": "2026-06-08",
              "ForecastPeriodEnd": "2026-06-14",
              "ForecastQuantityTotal": 131,
              "ForecastQuantityTotalRaw": 126
            }
          ],
          "ExtendedData": {                // optional - location level
            "PlannerCode": "PL-07"
          },
          "EventOccurredAt": "2026-05-21 03:05:12"
        }
      ],
      "ExtendedData": {                    // optional - item level
        "ProductFamily": "BRAKING"
      }
    }
  ]
}

Task status

The TaskStatusUpdate trigger issues a webhook each time an inbound integration task you submitted changes status. The payload is the task as GET /tasks/{TaskId} returns it; its fields and statuses are described in Task statuses. Batch.RejectedRecords lists only records GAINS refused while loading; records refused at submit were in the 207 or 422 response and are not part of the task.

{
  "DataType": "task",
  "Data": [
    {
      "TaskId": "8f3c1d02-5a77-4e61-9b0e-2d41c7a9f5b3",
      "TaskType": "InboundDemandTrans",
      "Status": "Completed",
      "StatusMessage": "Processing completed. Total objects = 1000. Accepted = 999. Accepted (with exclusions) = 0. Rejected = 1.",
      "Batch": {
        "TotalRecords": 1000,
        "Accepted": 999,
        "AcceptedWithExclusions": 0,
        "Rejected": 1,
        "RejectedRecords": [
          {
            "Record": {
              "IdealShipFromLocationCode": "CHI01",
              "ActualShipFromLocationCode": "CHI01",
              "CustomerRequestDate": "2026-05-28",
              "OrderEntryDate": "2026-05-21",
              "OrderNumber": "SO-2026-77431",
              "CustomerShipToCode": "SHIP-4410",
              "CustomerCode": "CUST-2048",
              "CustomerCodeDescription": "Northwind Distributors",
              "OrderFulfillCost": 120,
              "OrderRevenueCost": 380,
              "Channel": "WEB",
              "LotNumber": "LOT-5521",
              "SalesOrderComments": "Expedite if stock allows.",
              "LineItems": [
                {
                  "ItemCode": "938939",
                  "IdealShipFromLocationCode": "CHI01",
                  "ActualShipFromLocationCode": "CHI01",
                  "CustomerRequestDate": "2026-05-28",
                  "OrderFulfillCost": 120,
                  "OrderRevenueCost": 380,
                  "LotNumber": "LOT-5521",
                  "ItemDescription": "Widget Small",
                  "PromiseDate": "2026-05-29",
                  "OrderReleaseDate": "2026-05-22",
                  "OrderShipDate": "2026-05-27",
                  "RequestedQuantity": -12,
                  "ShippedQuantity": -4,
                  "SalesPrice": 24.5,
                  "LineNumber": "1",
                  "LineComment": "Return correction",
                  "BtoKitItemCode": "KIT-100",
                  "BtoKitLocationCode": "CHI01",
                  "OrderType": 1,
                  "ActualItemNumber": "938939",
                  "Status": "S",
                  "ExcludeFlag": false,
                  "ExtendedData": {
                    "CustomerInternalId": "REQ-88250"
                  }
                }
              ],
              "ExtendedData": {
                "SourceSystemOrderId": "ERP-55130"
              }
            },
            "Reasons": [
              {
                "Reason": "RequestedQuantity is negative"
              },
              {
                "Reason": "ShippedQuantity is negative"
              }
            ]
          }
        ]
      },
      "StatusUpdatedOn": "2026-05-21 11:47:31",
      "CreatedOn": "2026-05-21 11:44:38",
      "CreatedBy": "[email protected]",
      "UpdatedBy": null,
      "Comments": "One record refused; see RejectedRecords.",
      "UpdatedOn": null
    }
  ]
}

Did this page help you?