Converting Records
In this article we cover what a conversion rule is, how to set one up, the difference between converting a record by hand and letting Cubrel do it automatically, and what happens to the two records once they're connected.
What is a conversion rule
A conversion rule tells Cubrel how to create a record in one module from a record in another, for example "create an Order from a Quote." It's a reusable recipe, not a one-off action: once you've defined it, every record in the source module can be converted the same way, either by clicking a button yourself or automatically when conditions you choose are met.
Converting a record never changes or removes the original. A Quote stays exactly as it was; a new Order is simply created alongside it and linked back to it.
For automations that do more than create one record, such as sending an email or creating a follow-up task, see Workflows.
Creating a conversion rule
Go to Workspace > Automation > Conversion Rules > New Conversion Rule, then:
- Give it a name, and pick the Source Module (what you're converting from) and Target Module (what gets created). These can be any active module except Users, User Invites, Workspace and Roles. Once saved, these two modules can't be changed; delete and recreate the rule if you picked wrong.
- Fill in the Setup tab (below).
- Fill in the Mapping tab (below).
- Save.
Cubrel checks a few things before letting you save, so you can't create a rule that would fail or crash later:
- Every field the target module actually requires must have a mapping. Cubrel adds an empty row for each one automatically (and a sensible default where it can guess one, see below) so you don't have to remember which fields are required.
- A "from a field" mapping only offers source fields of the same type as the target field (and, for a record-type field, only ones pointing at the same related module), so you can't accidentally wire a text field into a number field.
- The one-line expression builder is only offered for text-like target fields (text, long text, email, phone, URL); it wouldn't make sense for a number or date field.
- If Link the two records is on, a relationship between the two modules must already exist. Create it first under the module's Relationships; see Relationships.
Setup tab
- Automatic: off by default. A conversion rule can always be run manually regardless of this toggle; turning it on additionally lets Cubrel run it by itself whenever a record's conditions become true, with no one clicking anything.
- Conditions: only shown once Automatic is on, since they only ever gate the automatic run, never the manual one. Add one or more
field / operator / valuerows (the same condition-builder used by List Filters), and choose whether all of them or any one of them must match. A rule can't be saved with Automatic on and no conditions, since an automatic rule with nothing to check would never actually run. - Link the two records: on by default. Links the source record to the one this rule creates, so each shows up in the other's Related tab. If you turn on both this and Automatic, Cubrel warns you: unlike a manual run, an automatic run has no confirmation step, so if the underlying relationship is a strict one-to-one, every automatic run silently replaces whichever record it was previously linked to.
Mapping tab
- Field Mappings: for each field on the target record, choose where its value comes from: a field on the source record, a fixed static value, or a small expression (literal text combined with a source field and/or a helper like today's date). A target field can only be mapped once. Required target fields are pre-added for you, and the two most common ones get a sensible default automatically: Owner defaults to "Current user" and Name defaults to the source record's own name. Both can still be changed.
- For a static value on a record-type field (e.g. mapping a fixed Owner or a fixed related record), a picker lets you search and select the actual record instead of typing an id, or choose "Current user" as a shortcut for whoever runs the conversion.
- The owner of the new record must be able to view the target module. If they can't, the conversion stops with an error naming the person; for an automatic run, the rule's owner is notified instead. See Roles and Permissions.
- Relationships to Copy: which of the source record's relationships (line items, notes, attachments, and so on) get copied onto the new record too. Use "Select all"/"Unselect all" to toggle every option at once.
Running a conversion manually
Any enabled conversion rule shows up under Convert in a record's action menu, regardless of whether Automatic is on. You see the rules you're allowed to run: you need to be able to view the source module and create records in the target module. Picking one:
- Checks whether running it would replace an existing link (only relevant for a one-to-one relationship). If so, you're asked to confirm before continuing, or you can create the new record without linking it at all.
- Creates the new record according to the rule's field mappings and copied relationships.
- Shows a confirmation with a link straight to the new record. You stay on the record you converted from; nothing navigates you away.
Automatic conversions
With Automatic on, Cubrel checks a record's conditions every time it's saved, and runs the conversion the moment they become true, with no button and no confirmation. This also happens when the record is saved by the REST API or a workflow, but not by an import. A few things worth knowing:
- It only fires when a save actually changes one of the condition fields, not on every unrelated save of a record that already qualifies.
- If a condition field is toggled away from matching and then back again, the rule fires again and creates a second record. This is by design: it's a simple, predictable trigger, not a full workflow engine that tracks whether it already ran once for a given record.
- Because there's no one in the loop to confirm anything, a one-to-one "Link the two records" setup can silently re-link a record on every automatic run (see the warning under Setup above). Turn off linking, or use a different relationship type, if that's not what you want.
Generating documents
A rule can also target the Documents module. Instead of field mappings, the editor then asks for one of the source module's PDF templates. Running the rule renders that template for the record and stores the PDF as a new document, linked to the record, by hand or automatically. For example, an automatic rule can file a PDF copy of every quote the moment it's marked Sent. See Documents.
The PDF is created in the background, so a manual run first says the document is being generated. The usual conversion notification follows once it exists. If the PDF can't be created, whoever ran the rule is notified; for an automatic run, the rule's owner is.
Who a rule runs as
Every rule has an owner: the admin who created it, changeable when editing. An automatic run started without anyone signed in runs as the rule's owner. If an automatic run fails, the rule's owner is notified with a link to the rule.
Notifications
Every run, by hand or automatic, notifies the owner of the source record that it was converted, unless they ran it themselves. An automatic run also notifies the person whose edit triggered it, since nothing on screen tells them otherwise. See Notifications.
Enabling, disabling, and deleting
The Conversion Rules list is grouped by source module and can be searched by name and filtered by module and status (enabled or disabled). From the list, each rule can be enabled/disabled with one click (a disabled rule can't be run at all, manually or automatically) or opened to edit. Deleting a rule removes the recipe itself, but never touches records or links it already created. If it has ever actually been used, you'll see a stronger warning before you can delete it, since that history can't be recovered afterward.
In short
| Question | Answer |
|---|---|
| Does converting a record change the original? | No, the source record is left untouched |
| Can I run a conversion rule by hand? | Yes, always, whenever it's enabled; Automatic doesn't affect this |
| Do Conditions affect the manual "Convert" action? | No, only the automatic run |
| Can a rule be Automatic with no conditions? | No, that's blocked when saving |
| What happens if I turn on both Automatic and Link the two records on a one-to-one relationship? | Every automatic run can silently replace the existing link, with no confirmation |
| Can I change the source/target module after creating a rule? | No, delete and recreate instead |
| Can Users, User Invites, Workspace or Roles be a source/target module? | No, they're excluded from the module pickers |
| Can I save a rule that leaves a required target field unmapped? | No, Cubrel blocks the save until every required field has a mapping |
| Can a rule create a PDF? | Yes, target the Documents module and pick a PDF template |
| Does deleting a rule delete records or links it already created? | No, only the rule itself is removed |