Concepts: Events, Triggers and Messages
The tebio platform is essentially based on an event-driven architecture. Instead of hard-wiring fixed processes as to when exactly an email has to be sent or a third-party system has to be notified, almost all relevant processes are first published in the system as technical events.
This concept enables processes to be decoupled: the actual business logic (e.g. automated invoicing in the billing run (Billrun)) does not take care of sending emails. Instead, triggers respond to the event and then asynchronously fire the desired messages.
This article explains the three components of this workflow.
1. Events
Section titled “1. Events”When an important business transaction occurs in the tebio platform, an event is generated. Examples of typical event types (event type codes) are:
customer.created(A new customer has been created)invoice.finalized(A binding invoice has been created)payment.failed(A payment failed)subscription.cancelled(a subscription was canceled)
Event History: Each event is saved in the customer view as a history entry (Customer History). Using the so-called EventTypeSettings you can define how a specific event type should be translated and displayed in different languages for customers (in the self-care / customer portal) or for your portal users (in the business portal).
2. Trigger
Section titled “2. Trigger”An event alone does not carry out an action - in the first step it is just a log entry. In order for an event to be followed by an action, triggers come into play. A trigger reacts to certain types of events and executes a linked action when they occur.
There are two central trigger mechanisms in the platform:
- System trigger (messaging): The internal messaging module reacts to events and triggers predefined email or letter workflows. For example, it is configured so that the invoice email is generated and sent to the customer in the event of a
invoice.finalizedevent. - Webhooks (External Triggers): You can configure your own webhook endpoints. As soon as an event type defined by you occurs, tebio sends a POST request (a push notification) to your own servers. This means you can automatically synchronize your CRM or ERP system without having to constantly poll the tebio API.
3. Messages
Section titled “3. Messages”When a system trigger fires, the Messaging Module takes over the creation and sending of the actual message. The platform primarily supports two transport methods: digital emails and postal letters.
News channels
Section titled “News channels”E-mail delivery
- SMTP accounts: You can store your own SMTP servers in the system so that emails (e.g. reminders or order confirmations) are sent cleanly under your own company domain.
- Email templates: You can create individual templates for each purpose. The messaging module automatically fills these templates at runtime with the specific values from the event (e.g. customer name, invoice amount) and attaches PDF documents if necessary.
- Store-and-Forward: Shipping takes place asynchronously. If your mail server is temporarily unavailable, the system will automatically try sending again.
Physical mail delivery (Deutsche Post)
- The system has an integrated connection to the E-POSTBUSINESS service of Deutsche Post.
- Based on letter templates, a PDF document (including correct address window positioning) is generated from the event data.
- The messaging module sends this PDF asynchronously to the post office, where it is printed, enveloped and delivered by post to the stored address or the intended recipient.
Summary
Section titled “Summary”- An action (e.g. invoicing) publishes a neutral Event.
- A configured trigger (system or webhook) registers the event.
- tebio sends a webhook to your systems or the messaging module generates a message (email/letter) based on a template.