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

Example:

"process_meter_reading"

ticketId
number

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

Example:

1010

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)

Example:

false

dryRun
boolean
default:false

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

Example:

true

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

Example:

376189

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

Example:

1

success
boolean
Example:

true

messageLocalized
string

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

Example:

"Powercloud accepted meter reading"

internalData
object

Technical output for debugging purposes

Example:
{
  "requestEndpoint": "saveReadingByContractId",
  "requestParams": "readingValue=21;date=2022-12-31"
}
executedAt
string

Date and time when intent was executed

Example:

"2022-12-13 22:18:06"

userId
integer

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

Example:

1

sent
boolean

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

ticketClosed
boolean

Was the ticket closed?

Example:

true

recipient
string
Example:

"john@smith.com"

message
string | null
Example:

"We successfully processed your meter reading of 21 kWh dated Dec 31, 2022"

template
string | null
Example:

"<p>Dear John,</p><p>%MESSAGE%</p><i>Mike from your service team</i>"

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

Example:

"c916167c94"