How to Create Events
Learn how to create and configure events in MsgGO to manage your message delivery effectively.
Before You Start
To create an event in MsgGO, you need:
- A MsgGO account
- Basic understanding of JSON structure
- Clear idea of what triggers you want to track
Creating Your First Event
- Log in to your MsgGO account
- Navigate to "Events" in the left sidebar
- Click the "Add Event" button
-
Fill in the required fields:
- Name (3-255 characters)
- Group (for organization)
- Add an optional description (recommended)
Understanding Event Matching
Default Matching
By default, MsgGO creates a matching rule based on your event name. For example, if you create an event named "Daily Database Backup", MsgGO will look for messages with:
{"event_name": "daily-database-backup"}
Flexible Matching System
MsgGO's matching system is intentionally designed to be flexible. While we suggest using the event_name
key, you're free to use any identifier that fits your needs, such as "id", "event", "type", or "uid". This flexibility allows you to integrate MsgGO with existing systems without modifying your current event structure or naming conventions.
Custom Matching Rules
You can define custom matching rules based on JSON keys and values. For example:
{
"type": "backup",
"database": "production",
"status": "completed"
}
Understanding Rule Overlapping
When creating event definitions, it's important to understand how overlapping rules work. Consider this example:
Event Definition A:
-
Matches events with:
{"event_name": "database"}
Event Definition B:
-
Matches events with:
{"event_name": "database", "status": "success"}
If you send this event:
{
"event_name": "database",
"status": "success",
"timestamp": "2023-12-01 12:00:00"
}
This event could match either definition A or B, and there's no guarantee which one will be processed first. The matching is done on a "first-come-first-served" basis, which might not always give you the desired result.
To avoid unpredictable matching:
- Create distinct matching rules for each event definition
- Use more specific identifiers
- Avoid creating overlapping rule sets
Organizing Events
Using Groups
Groups help organize your events logically. You can create groups based on:
- Teams (Development, Marketing, HR)
- Functions (DevOps, Architecture, Management)
- Applications or Services
- Departments (Sales, Billing, Support)
Nested Groups
You can create nested groups up to two levels deep, for example:
-
DevOps
- Backups
- Deployments
-
HR
- Onboarding
- Announcements
Naming Best Practices
Event Names
Choose names that clearly indicate the event's purpose:
- "Daily Database Backup"
- "Production Deployment"
- "New Contact Form Submission"
- "Server CPU Alert"
Group Names
Select group names that reflect your organization's structure or workflow:
- By Department: "HR", "Sales", "Engineering"
- By Function: "Monitoring", "Automation", "Communication"
- By Team: "Team Alpha", "Backend Team", "Frontend Team"
Need Help?
- Check our FAQ
- Contact Support
- Visit our Documentation