How do they work?
Get to know how you can define and protect event definitions
So, you’ve heard about the Event Registry feature and you’re curious how it works.
At its core, the Event Registry feature is built on effective event management and clear definitions. Let’s dive in and explore the first step: creating a Category.
Create a Category
A Category is a logical grouping that Event Types can be associated with one another. There is no rules or limitation on category groupings, but to aid subscribers, the categories should have logical grouping. For example, all Events pertaining to a customer could be conveniently grouped together. Or all Transactional events can be grouped together.
To create a Category:
- Open the Management Portal.
- Select
Categories
in the left sidebar menu. - Press the
Add Event Category
button. - Give the Category a unique name.
- Add a description for the Category.
- Press the
Create
button.
Update a Category
A Category is a logical grouping that Event Types can be associated with one another. You can conveniently edit or update Categories to reflect better category names or descriptions.
To edit a Category:
- Open the Management Portal.
- Select
Categories
in the left sidebar menu. - Select the category you want to edit.
- Press the
Cog
icon top right hand side. - Update the Category to a unique name.
- Update the description for the Category.
- Press the
Save
button.
Create an Event Type
Now that you have successfully created your first Category, let's add an Event Type to it.
An Event Type in webhooks specifies the kind of event that triggers the webhook. It defines the particular action or occurrence, such as customer.created
or order.completed
that initiates the webhook call.
To create an Event Type for the newly created Category:
- Be sure to be inside the newly created Category.
- Press the
New Event
button. - Name the Event Type.
- Add a brief description to the Event Type.
- Define the schema of the Event Type or allow Qala to generate the JSON schema for you conveniently.
- Press the
Create
button.
Upon the creation of the Event Type we recommend:
- Naming the Event Type with a noun followed by a verb clearly indicates what entity is affected and what action occurred, enhancing readability and understanding. For example, "customer.created" specifies that a customer was created.
- To remove any ambiguity for the Event Type, you can add a brief description denoting what the Event Type is for and when the event is triggered.
- On the schema definition, you can simply copy an existing schema, ensuring it conforms to JSON schema standards or allow Qala to generate the JSON schema for you conveniently. Alternatively, you can create an event without a schema but it’s best practice to define the schema for your subscribers.
Update an Event Type
You can conveniently edit or update exiting Event Types to reflect better name, versioning, description or event schema.
To update an Event Type to reflect changes:
- Select the Event Type you want to edit by pressing the Event Name.
- Update the Event Type if applicable.
- Edit the description to the Event Type if applicable.
- Define the schema of the Event Type or allow Qala to generate the JSON schema for you conveniently.
- Press the
Update
button.
Remove Event Type from a Category
You can easily remove an Event Type from a category.
To remove an Event Type from an existing Category:
- Open the Management Portal.
- Select
Categories
in the left sidebar menu. - Select the category you want to remove the Event Type from.
- Within the list of Event Types, choose the event you want to remove by select the
X
button. - Reaffirm the action to confirm the removal of the Event Type from the Category by pressing
Tick
icon. - The Event will now be removed from that Category and placed within an uncategorized events category.
Don't worry, the Event Type will still be available to the Topic and Subscriptions, it will just be grouped under the uncategorized heading.
Move Event Type from a Category
You can easily move an Event Type from one category to another.
To move an Event Type from an existing Category to another:
- Open the Management Portal.
- Select
Categories
in the left sidebar menu. - Click the category you want to move the Event Type from.
- Click on the Event Type and drag it to the desired category. Once you release the click, the Event Type will be successfully moved to the new category.