Document events

Simultaneous updates that actually work.
Automate workflows by using document events.

Simultaneous updates

Rual uses mutation based document updates. Only fields that are actually changed are updated in the source document. In a normal procedure, the source document is retrieved, changed in two different places and both save actions would update the document entirely. But the second update would overwrite the previous update with old information. In Rual you don't need to worry about this.

Example

Two employees from your helpdesk are in separate calls with the same enterprise customer. One of them handles an address change, the other adds a new contact. Both helpdesk employees register their own changes and then save the same document. Because only the mutations are altered, the updated Rual document will have the new address and the new contact.

Automate workflows

There are a number of use cases where you would like to have an automated action if a document changes.
In Rual you can automate these events, setting different routes depending on what fields change and the contents of the change. An example can be found in our tutorials.

Event triggers

Start your workflow:
  - on update
  - on create
  - on save (update or create)
  - on remove

Update related documents

Use document events to update related documents. As mentioned before, if you have a supplier name in a product document, and the supplier changes its name, you want to update the product documents as well. Search on the supplier guid and copy the new name to the products using the update multiple documents block.

There is so much more!

With document events you can automatically:
  - send a mail to sales if a new customer registers
  - update a transport route if a delivery is cancelled
  - fulfill open orders from purchase transactions
  - cancel appointments by sms if a dentist calls in sick
  - push revenue updates to a Slack channel

next course: Data Revisions

part of the Basic Rual Developer courses