Create a Rule
Now that the Publisher and the Event Function are configured, let us define how the events should be processed and delivered by setting up a Rule.
Follow these steps to create the Rule:
-
In the Developer Console, select your project: InvoiceNotifier.
-
Go to Catalyst Signals and click on Rules in the left navigation.

- Click Add Rule, then provide a name and description for your rule.

Define Event Source
-
Under Source, click Choose Event, and select the Zoho Books Publisher you added earlier.
-
From the list of available events, choose Customer Payment Created, then click Done.

Define Event Filter
- In the Filter section, click the edit icon and choose Events matching certain conditions.

- Create a filter condition to include only events where the invoice status is Paid:
- In the Path dropdown, select the JSON path that corresponds to the payment_status field.
- Define the condition to match Paid.
- Click Save to apply the filter.

Configure Target Settings
-
Click Choose Target and give your target a name.
-
Under Consumer Type, select the Event Function we created earlier using the CLI.
-
Set the Dispatch Policy to Batch by Interval:
- Choose an interval of one hour.
- Set the Retry Count to five.

Transform the Payload
-
In the Target Input section, choose Transform.
-
From the default event payload of the Customer Payment Created event, select only the required data and structure them as shown below.
Expected Event Payloadcopy{ "data" : [ [ { "Customer" : "test", "Invoice Number" : "Customer opening balance", "Amount" : "₹3,24,244.00", "Paid On" : "31/10/2023", "Invoice Id" : "275557000000158181" } ] ] }
Data Mapping for Template Compilercopy{ "data" : $.events.forEach((event)-> event.data.payment.invoices.forEach((invoice)-> { "Customer" : event.data.payment.customer_name, "Invoice Number" : invoice.invoice_number, "Amount" : invoice.total_formatted, "Paid On" : event.data.payment.date_formatted, "Invoice Id" : invoice.invoice_id } ) ) }
Paste this structure into the template compiler to extract the required fields and click Generate Output.
![]()
Check out the Even Body Transformation help guide to learn how to customize event payloads in detail.
- Save the target configurations, then click Save again to finalize the rule.
Now, whenever a customer completes a payment, the corresponding invoice in Zoho Books is updated. This update triggers an event that is processed every hour in Catalyst Signals and automatically sends a summarized message to the Zoho Cliq channel.
![]()
Last Updated 2025-06-10 18:26:01 +0530 +0530