---
title: "Sample Payload for Custom Events"
url: https://docs.catalyst.zoho.com/en/cli/v1/event-generate/sample-payload-custom-event/
description: "Catalyst enables you to generate sample payloads from various event sources supported by Catalyst Signals using the CLI."
last_updated: 2026-08-17T12:16:04Z
service: All Services
type: general
---
# Generate Sample Payload for a Custom Event Source
### Payload Generation
A [Custom Publisher](https://docs.catalyst.zoho.com/en/signals/help/publishers/create-publisher/custom-publishers/) is used to pass data to a target function whenever its URL is invoked by the end user. Custom Publishers can contain multiple rules, which can be associated with different target functions. All rules of a Custom Publisher have the same URL endpoint, but each rule will contain a unique **rule identifier** variable that you can configure while creating it.
This allows you to indicate the specific rule to invoke.
> **Note:** Custom Publishers do not exist in a project by default. You must therefore first create a Custom Publisher in your project from the Catalyst console before generating a sample payload for it. You can create a rule in the CLI for testing purposes while generating the sample payload. This will not be reflected in the Custom Publisher configured in the console.
You can generate a sample payload for a custom event by executing this same command:
```sh
catalyst event:generate|generate:event [options] <source> <action>
```
However, Catalyst only accepts the following values for source and action for a custom event source:
| Source |
Action |
| custom |
Produce |
### Mandatory Command Options
You must also use these options **mandatorily** while generating a sample payload for a custom event:
#### -e | -\-event-bus
The `\--event-bus` option performs the same action as discussed in the previous section. It enables you to specify the name of the event bus that must be used in the sample payload. The `event\_bus\_details` JSON will contain the name that you pass as the bus's name.
#### -rid | -\-rule-id
The `\--rule-id` option enables you to specify the rule identifier that must be used in the custom event payload. As mentioned earlier, a rule identifier uniquely identifies a rule in a custom event bus. The `data` field in the JSON will contain the rule identifier.
You can generate a sample payload for a custom event, and pass the event bus name and rule identifier by executing the following command:
```sh
catalyst event:generate|generate:event custom Produce --event-bus TrackerRequests --rule-id DomesticTracking
```
This will generate the following JSON payload. The payload will contain the details of your project, event bus, and rule identifier details you provided, as well as other sample data.

> **Note:** If you are a **Visual Studio Code IDE** user, you can install the **Catalyst Tools** extension, and perform CLI operations using your IDE in place of the CLI. Steps to debug your event functions using Visual Studio Code IDE can be found [here](https://docs.catalyst.zoho.com/en/catalyst-extensions/vs-code-extension/implementation/#run-or-debug-a-function).