Miridia
Portal
Integrations

Workflows and events

Use n8n, Zapier, Power Automate, or a webhook to run your own automation when something changes in Miridia.

Miridia raises an event each time an important change occurs. For example, a customer is created, a product price changes, or a shipment is delivered. Each event has a trigger. You attach workflows to a trigger. When the event occurs, Miridia sends the event data to each workflow that is attached to that trigger.

A workflow runs in an external workflow engine, or at a webhook address that you own. Thus you can add behaviour to Miridia without a change to Miridia itself. For example, you can send a message when an order is cancelled, or push a price change to your store.

Workflow engines

EngineStatus
n8nNative support
Elsa WorkflowsNative support
Power AutomateAvailable
ZapierAvailable
Custom webhooksAvailable
RabbitMQAvailable

Connect an engine in the same way as other integrations. Read Connect an integration.

The default engine

A business can connect more than one workflow engine. Miridia makes each new workflow in the default engine. The first engine that you activate becomes the default. Each engine that you add after it is not the default, until you make it the default.

For example, you connect n8n first and Zapier second. n8n stays the default, and Miridia makes each new workflow in n8n.

The default rule applies only to workflow engines. For other integrations, an event goes to each connected provider that has a workflow on that trigger. There is no default store and no default accounting package.

How a workflow runs

  1. A change occurs, for example a user saves a new product price.
  2. Miridia raises one or more events. A price change raises OnProductUpdated and OnProductPriceChange.
  3. For each event, Miridia finds each active workflow that is attached to the trigger.
  4. Miridia runs the workflows in their position order. Each workflow gets a POST request with the event data.

You can change the position order of the workflows for an entity type. Use this when one workflow must run before another.

Automatic workflows and manual actions

A workflow can run automatically, or a user can start it:

  • Automatic: the workflow runs each time its trigger occurs. This is the default.
  • Single action: the workflow shows as an action on the details page of one record, for example "Sync this order" on the order page. It runs for that one record.
  • Multi action: the workflow shows as a bulk action on the list page, for example "Sync orders" on the orders list. It runs for the selected records.

A workflow usually uses only one of these surfaces.

Workflows for one record

Usually a workflow runs for each record of its entity type. You can also bind a workflow to one record. For example:

  • A high-value order that needs a special notification route.
  • One product that needs its own restock workflow.

Switch a workflow off

A new workflow is active immediately, and it shows in the workflow list. To stop a workflow without a delete, switch it off. The workflow stays in the engine, but Miridia does not send events to it.

The trigger catalogue

The tables give each trigger that you can attach a workflow to. The event name is the name that the event data and the API use.

Customers

IdTitleEvent name
2Customer CreatedOnCustomerCreated
3Customer UpdatedOnCustomerUpdated
45Customer Contact CreatedOnCustomerContactCreated
46Customer Contact UpdatedOnCustomerContactUpdated
74Customer DeletedOnCustomerDeleted

Products and inventory

IdTitleEvent name
7Product CreatedOnProductCreated
8Product UpdatedOnProductUpdated
9Product Price ChangedOnProductPriceChange
10Product Stock Count ChangedOnProductStockCountChange
27Product DeletedOnProductDeleted
67Inventory Low StockOnInventoryLowStock

Orders

IdTitleEvent name
13Order CreatedOnOrderCreated
14Order UpdatedOnOrderUpdated
15Order Status ChangedOnOrderStatusChanged
39Order Item CreatedOnOrderItemCreated
40Order Item UpdatedOnOrderItemUpdated
41Order Item DeletedOnOrderItemDeleted
98Order DeletedOnOrderDeleted

Shipments and delivery plans

IdTitleEvent name
20Shipment CreatedOnShipmentCreated
21Shipment UpdatedOnShipmentUpdated
22Shipment CancelledOnShipmentCancelled
23Shipment DeliveredOnShipmentDelivered
24Shipment Status ChangedOnShipmentStatusChanged
25Shipment Quotation GeneratedOnShipmentQuotationGenerated
26Shipment Quotation AcceptedOnShipmentQuotationAccepted
34Shipment Delivery RequestedOnShipmentDeliveryRequested
97Shipment DeletedOnShipmentDeleted
47Dispatch CreatedOnDispatchCreated
48Dispatch UpdatedOnDispatchUpdated
95Dispatch DeletedOnDispatchDeleted

A "dispatch" is a delivery plan: a group of shipments that leave together.

Purchase orders

IdTitleEvent name
68Purchase Order CreatedOnPurchaseOrderCreated
69Purchase Order ReceivedOnPurchaseOrderReceived
90Purchase Order Status ChangedOnPurchaseOrderStatusChanged
91Purchase Order UpdatedOnPurchaseOrderUpdated

Transfer orders

IdTitleEvent name
65Transfer Order CreatedOnTransferOrderCreated
66Transfer Order ReceivedOnTransferOrderReceived
92Transfer Order Status ChangedOnTransferOrderStatusChanged
93Transfer Order DispatchedOnTransferOrderDispatched

Work orders

IdTitleEvent name
61Work Order CreatedOnWorkOrderCreated
62Work Order StartedOnWorkOrderStarted
63Work Order CompletedOnWorkOrderCompleted
64Work Order CancelledOnWorkOrderCancelled
94Work Order UpdatedOnWorkOrderUpdated

Bills of material

IdTitleEvent name
70Bom CreatedOnBomCreated
71Bom UpdatedOnBomUpdated
72Bom DeletedOnBomDeleted

Suppliers

IdTitleEvent name
53Supplier CreatedOnSupplierCreated
54Supplier UpdatedOnSupplierUpdated
55Supplier DeletedOnSupplierDeleted

Businesses, users, vehicles, and integrations

EntityIdTitleEvent name
Vehicle73Vehicle CreatedOnVehicleCreated
Business57Business CreatedOnBusinessCreated
User50User RegisteredOnUserRegistered
Integration31Integration Provider ConfiguredOnIntegrationProviderConfigured
Integration32Integration Provider ActivatedOnIntegrationProviderActivated
Integration96Integration Provider DeactivatedOnIntegrationProviderDeactivated
The catalogue can grow. To get the current list for an entity type, send GET /api/Triggers/{entityType}, for example GET /api/Triggers/Order.

Next steps

Automate with n8n

Send a message when an order is cancelled.

Notifications

Learn which events already send a notification in the portal.