POST
/
intent
/
{intentId}
/
execute
curl --request POST \
  --url https://demo.enneo.ai/api/mind/intent/{intentId}/execute \
  --header 'Content-Type: application/json' \
  --data '{
  "intentId": 123,
  "code": "process_meter_reading",
  "ticketId": 1010,
  "informCustomer": false,
  "dryRun": true,
  "data": {
    "_action": "enter_into_system"
  },
  "contractId": 376189
}'
{
  "responseCode": "entered_into_system",
  "success": true,
  "messageLocalized": "Meter reading successfully entered into system",
  "internalData": {
    "requestEndpoint": "saveReadingByContractId",
    "requestParams": "readingValue=21;date=2022-12-31"
  },
  "executedAt": 1672410060,
  "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>",
  "txId": "c916167c94"
}

Authorizations

connect.sid
string
cookie
required

Cookie-based authentication

Path Parameters

intentId
integer
required

The id of the intent that should be executed

Body

application/json
Optional additional parameters to override/validate the existing data in the intent or trigger a response to the customer
intentId
number
code
string

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

ticketId
number

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

informCustomer
boolean
default:
false

If true, an email is being sent to the customer informing him about the outcome, and the corresponding ticket is closed (if the operation was successful)

dryRun
boolean
default:
false

If true, the execution is simulated without any write API calls triggered to the backend systems

data
object

Intent-specific data object that should be used to process the intent

contractId
integer

Optional contract id. If provided, the backend verifies that the provided contractId matches the contract id associated to the intent and throws an error if it does not match

Response

200
application/json
Option was processed

Shows the outcome (if the intent was already executed)

aiAgentId
integer

ID of the AI agent that was executed

success
boolean
messageLocalized
string

Human-readable message, usually from the backend system. Already localized.

internalData
object

Technical output for debugging purposes

executedAt
string

Date and time when intent was executed

userId
integer

User ID of user that triggered the intent. 0 for system user

sent
boolean

Was the email / chat message / etc. described in this object successfully sent?

ticketClosed
boolean

Was the ticket closed?

recipient
string
message
string | null
template
string | null
sources
object[]

Any sources that were used to create the result

A source that was used by an AI model / intent

txId
string

Unique transaction id. Corresponds to a log entry in enneo