Skip to main content

Types of actions in rules

Stéphane Jauffret avatar
Written by Stéphane Jauffret
Updated over a year ago

💡 Sometimes you want to transform your content in different ways. You might want to just transform content one way or another but keep the same number of lines in the input file and the output file. And sometimes you want to add more lines, or delete some lines in the content. Sometimes you also just want to annotate some lines in your content, without really modifying it.

In order to do this, you can use action types in your rules.

Rules can have the below types of actions:

  1. Transform

  2. Filter out

  3. Insert line

  4. Duplicate line

  5. Deduplicate line

  6. Insert tag

  7. Remove tag

Change the action type here, in the rules:

Transform

"Transform" is the most common action type in rules. That's when you want to apply a change to a column given in the input.

You can concatenate text with the input content, search and replace, remove content, change a date format etc. See this article for more ideas on what you can do, and this other one for all transformation functions.

Example of a transform rule that concatenates two columns Brand name and Item name, while separating by " - "

The column names can be used by just clicking on the "target column" button and will display like this in the editor:

#(brand_name) - #(item_name)

Filter out

"Filter out" allows you to exclude lines that you don't want to have in the target file.

Insert new line

"Insert new line" allows you to add an extra line in the target file for every group of conditions that are met.

For example, if you are transforming a file containing invoices that are all displayed like this :

And you want this in the output:

👉 To know exactly how to use the Insert new line action type, read this article

Duplicate and deduplicate line

Those will take all lines that meet the conditions you indicate and will double the lines, or remove duplicates.

For remove duplicates, it will keep the first line it finds, in the order of your input file.

Insert and Remove tags

Tags enable you to mark some lines in your files, so you can reuse them in rules. Tags are not sent in the output file.

They allow you to mark all lines in the file that meet a certain complex condition

Tags are useful when you have done many rules in your workflow, and need to regroup some lines in your file in an easy way.

For example,

  • if you have done many different price rules that affect differently many lines of your file, you can all mark them with a "promotion tag".

  • if you have done many detailed categorization rules, you can mark them with a more general categorization tag.

Did this answer your question?