Skip to main content
Workflows are conversational flows that define the bot’s behavior. You can query the workflows available in your bot and redirect users to a specific workflow.

Get Workflows

Query all workflows available in your bot.
GET https://api.jelou.ai/v1/bots/{botId}/skills

Path Parameters

FieldLocationTypeRequiredDescription
botIdPathstringYesUnique identifier of the bot.

Request Example

curl --request GET \
  --url 'https://api.jelou.ai/v1/bots/BOT_ID/skills' \
  --header 'Authorization: Basic {{Base64EncodedUsername:Password}}'

Responses

{
  "message": ["Skills retrieved successfully!"],
  "statusMessage": "success",
  "status": 1,
  "data": [
    {
      "id": 1,
      "name": "Main Skill",
      "description": "Welcome skill",
      "type": "BRAIN",
      "createdAt": "2024-10-24T11:18:05.000Z",
      "updatedAt": "2024-10-24T11:18:05.000Z",
      "state": true,
      "default": true
    },
    {
      "id": 2,
      "name": "Sales Skill",
      "description": "Sales flow",
      "type": "BRAIN",
      "createdAt": "2024-10-24T11:13:32.000Z",
      "updatedAt": "2024-10-24T11:17:44.000Z",
      "state": true,
      "default": false
    }
  ]
}
{
  "message": "Authentication failed"
}
{
  "message": ["Bot not found"],
  "status": "failed"
}

Response Detail

PropertyTypeDescription
idintegerWorkflow ID. This ID must be used to configure redirects.
namestringWorkflow name.
descriptionstringWorkflow description.
typestringWorkflow type.
statebooleanWorkflow state. Only workflows with state true can be used.
defaultbooleanIndicates whether the workflow is selected as the default for the bot.
createdAtdateWorkflow creation date.
updatedAtdateDate of last update of the workflow.

Configure User Workflow

Redirect a user to a specific workflow within the conversational flow.
POST https://api.jelou.ai/v1/bots/{botId}/users/{userId}/skill/{skillId}

Requirements

  • The user must have an active session.

Path Parameters

FieldLocationTypeRequiredDescription
botIdPathstringYesUnique identifier of the bot.
userIdPathstringYesUnique identifier of the user.
skillIdPathstringYesIdentifier of the workflow to which the user will be redirected.

Request Body

FieldLocationTypeRequiredDescription
memoryParamsBodyobjectNoOptional parameters that can be injected and used later in the workflow.

Request Example

curl --request POST \
  --url 'https://api.jelou.ai/v1/bots/BOT_ID/users/USER_ID/skill/SKILL_ID' \
  --header 'Authorization: Basic {{Base64EncodedUsername:Password}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "memoryParams": {
      "test": 1
    }
  }'

Responses

{
  "message": "Skill set successfully",
  "status": "success"
}
{
  "message": "Invalid request",
  "status": "failed"
}
{
  "message": "Authentication failed"
}
{
  "message": "User or Skill not found",
  "status": "failed"
}