Main Process
  • 10 May 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Main Process

  • Dark
    Light
  • PDF

Article Summary

The Main Process receives the converted data from the messengers and runs the initial business logic of the bot before routing tasks to sub-processes.
Input JSON example

{
    "channel": "viber",
    "chat_id": "12312321",
    "event": "message",
    "message": {
    "type": "text",
    "text": "Lorem ipsum..."
	}
}

Incoming data parameters to the Main Process

ParameterTypeRequiredDescription
channelstring+Name of a messenger from which a user wrote
chat_idstring+Unique identifier of a user
eventstring+Event type. Available options: start, context, message, command.
messageobject+Message object.
first_namestring-User’s first name.
last_namestring-User’s last name.
genderstring-User’s gender.
user_picturestring-Link to a user’s profile picture.
countrystring-Country where a user is currently in and detected by a messenger automatically.
languagestring-Language set on the user’s device.
timezonestring-Time zone.
contextstring-Data of the context event.

Was this article helpful?

What's Next