{
  "format": "janus-integrations-v1",
  "definitions": [
    {
      "id": "lookup",
      "content": {
        "name": "MES item lookup",
        "kind": "sql",
        "endpoint": "MES_PROD",
        "method": "",
        "body": "",
        "headers": [],
        "inputs": [
          {
            "name": "reelId",
            "type": "text"
          }
        ],
        "mappings": [
          {
            "from": "ReelId",
            "to": "reelId",
            "rule": "must-match"
          },
          {
            "from": "ItemNo",
            "to": "partNumber",
            "rule": "must-match"
          },
          {
            "from": "Qty",
            "to": "quantity",
            "rule": "external"
          },
          {
            "from": "LotNo",
            "to": "lot",
            "rule": "label-first"
          }
        ],
        "success": {
          "field": "ItemNo",
          "op": "exists",
          "value": ""
        },
        "sql": {
          "server": "mes-sql01",
          "database": "MES_PROD",
          "account": "janus_mes_read",
          "statement": "SELECT ReelId, ItemNo, Qty, LotNo FROM dbo.ReelLabel WHERE ReelId = @reelId",
          "readOnlyProfile": true
        }
      }
    }
  ]
}