Enneo

Intent

Update an intent with new, modified input data

PUT /intent/{intentId}

PUT /intent/{intentId}

Path parameters

intentIdintegerpathrequired

The id of the intent that should be executed

Request body

Parameters to override/validate the existing data in the intent

codestringbody

This field is necessary for creating new intent when we don't have intentId

ticketIdnumberbody

This field is necessary for creating new intent when we don't have intentId

dataobjectbody

Intent-specific data object that should be used when updating the intent. If a property is not included in the request, it is not updated.

Request Example

{
  "code": "process_meter_reading",
  "ticketId": 1010,
  "data": null
}

Responses

200 — Intent was updated

Response Example

{
  "id": 1211221,
  "code": "process_meter_reading",
  "name": "Process a meter reading",
  "contractId": "746839",
  "status": "ready",
  "confidence": 0.95,
  "confidenceColor": "warning",
  "verified": false,
  "context": null,
  "messagePreview": "We have successfully processed your meter reading",
  "recipient": "john@smith.com",
  "tags": "prePopulated",
  "data": null,
  "options": [
    {
      "type": "enter_into_system",
      "name": "Eintragen",
      "icon": "check",
      "recommended": true,
      "order": 1
    },
    {
      "type": "ignore",
      "name": "Ignorieren",
      "icon": "cancel",
      "recommended": false,
      "order": 2
    },
    {
      "type": "forward_to_vnb",
      "name": "An VNB verweisen",
      "icon": "questionMark",
      "recommended": false,
      "order": 3
    }
  ],
  "infos": [
    {
      "code": "USER_WARNING",
      "type": "warning",
      "message": "Reading is plausible",
      "extraInfo": "Expected reading was 421 kWh. Plausbible because difference to 317 kWh is below threshold of 200 kWh"
    }
  ],
  "extraInfo": null,
  "outcome": {
    "aiAgentId": 1,
    "success": true,
    "messageLocalized": "Powercloud accepted meter reading",
    "internalData": {
      "requestEndpoint": "saveReadingByContractId",
      "requestParams": "readingValue=21;date=2022-12-31"
    },
    "executedAt": "2022-12-13 22:18:06",
    "userId": 1,
    "sent": true,
    "ticketClosed": true,
    "recipient": "john@smith.com",
    "message": "We successfully processed your meter reading of 21 kWh dated Dec 31, 2022",
    "template": "<p>Dear John,</p><p>%MESSAGE%</p><i>Mike from your service team</i>",
    "sources": [
      {
        "type": "knowledgeSource",
        "id": 376189,
        "name": "Opening hours",
        "url": "https://company.com/faq/376189",
        "text": "Our service hours are from 8am to 5pm. We are closed on weekends. [...]"
      }
    ],
    "txId": "c916167c94"
  }
}

403 — Unauthorized

404 — Intent not found

500 — Internal error