Generate Sample Payload to Test Integration Functions
Payload Generation
Integration functions enable you to code and use a Catalyst function as the backend of other Zoho services, and establish an integration with them. Catalyst currently supports integration with Zoho Cliq and ConvoKraft Bot Logic through Integration functions.
You can develop the backend of Cliq extensions that bundle bots, commands, message actions, widgets, and functions through Integration functions. The CLI enables you to generate sample payloads for various handlers in each of these tools.
The general command to generate a sample payload to test an Integration function in the CLI is:
Because Catalyst only supports integrations with Cliq currently, you must provide the following value for as the service: ZohoCliq.
Catalyst supports the following Cliq components and handler classes that you can generate a sample payload for, in the CLI.
Component | Handler Classes |
---|---|
bot | welcome_handler message_handler context_handler mention_handler action_handler incomingwebhook_handler participation_handler |
command | execution_handler suggestion_handler |
messageaction | execution_handler |
widget | view_handler |
function | button_handler form_handler form_change_handler form_values_handler widget_button_handler |
installation | installation_handler installation_validator |
- Execute the following command to select the component and a handler class to generate the payload for:
- Select a component from the list and press Enter .
- Select a handler class from the list and press Enter .
The CLI will generate a sample JSON payload for that component and handler source. Depending on the component, the payload will contain relevant data.
You can also directly save the JSON payload into a file instead of displaying it in the CLI.
Integration Functions Event Generation Options
--inputs <inputs>
You can generate a sample payload to test Integration functions by directly specifying the component and the handler you require the data for. The inputs must be specified in the following format:
For example, to generate a sample payload for a form_handler class for the function component, execute the following command:
This will generate the following JSON payload.
Refer to the table shown above for a list of Cliq components and handler classes supported by Catalyst.
Last Updated 2024-01-09 17:07:13 +0530 +0530
Yes
No
Send your feedback to us