User Cache

Page describing the user cache API

Think of the cache as a unique memory associated with each person who writes to your bot. This memory can be used in different ways within your flow, these are some examples:

  • Associating an order number to a user.

  • Letting the bot know data like the user's name before the conversation starts.

  • Adding necessary data to consult services of your system in specific flows.

In addition to all this there are specific "keys" for default bot actions like:

  • Setting a flow before the user starts the conversation ( SOON )

Get user cache

GET https://api.jelou.ai/v1/users/:userId/cache

This endpoint retrieve a specific user cache.

Path Parameters

NameTypeDescription

userId

string

User phone number. (Without the "+" sign)

{
  "groupId": "<groupId">
  . 
  .
  .
}

Set user cache

POST https://api.jelou.ai/v1/users/:userId/cache

Path Parameters

NameTypeDescription

userId

string

User phone number (Without the "+" sign)

Request Body

NameTypeDescription

params

object

Object to be merged with user cache

botId

string

Bot id

{
  "message": [
    "User cache set correctly."
  ],
  "status": "success"
}

Last updated