Create rules
On this page
Rule Builder allows you to create rules for cleaning, transforming, normalizing, and modifying the data.
In this article, you will learn how to create rules in CluedIn using the Rule Builder tool. You can create a rule either before or after processing the data.
Create rule
Creating a rule involves configuring a filter and defining the rule action.
To create a rule
-
On the navigation pane, go to Management > Rule Builder.
-
Choose the type of rule that you want to create. Then, select Create Rule.
-
Enter the name of the rule. Then, select Create.
The rule details page opens.
-
In the Filters section, select Add First Filter, and then specify to which items the rule will be applied:
-
Select the type of property (Property or Vocabulary).
-
Depending on the type of property that you selected before, find and select the needed property or vocabulary key.
-
Select the operation.
-
Select the value of the property or vocabulary key.
If you want to create a rule for a value that does not yet exist in CluedIn, then enter a new value.
The fields for configuring a filter appear one by one. After you complete the previous field, the next field appears. For more information, see Filters.
-
-
In the Actions section, select Add Action, and then configure the action that CluedIn can perform on the filtered items:
-
Enter the name of the action.
-
(Optional) If you want to narrow down your filter query, specify additional conditions for the rule. To do this, in the Conditions section, select Add first rule, and then configure the condition according to the instructions from step 4.
-
In the Action section, select the action to be performed by the rule. To learn more about what each action does, see Rules reference.
-
Depending on the action that you selected, provide the required information.
For example, if you selected the Add tag action, specify the value of the tag.
-
In the lower-right corner, select Add Action. You can add multiple actions to the rule.
-
-
In the upper-right corner of the rule details page, select Save, and then confirm your choice.
-
Activate the rule by turning on the toggle next to the rule status.
-
Depending on whether the rule applies to the processed or unprocessed data, do one of the following:
-
If the rule applies to the processed data, reprocess the records.
-
If the rule applies to the unprocessed data, process the data as described in the Ingest data guide. In this case, the rule will be applied to the records automatically during processing.
-
Reprocess records
After you created the rule for the processed data, you need to reprocess the records to apply the rule. You can reprocess the records in one of the following ways:
-
Reprocess records via the rule details page.
-
Reprocess records using the GraphQL tool.
-
Reprocess each record manually.
To reprocess records via the rule details page
-
Near the upper-right corner of the rule details page, select the reprocess icon.
-
Confirm that you want to reprocess the records associated with the rule.
After the reprocessing is completed, the records associated with the rule are updated in accordance with the rule’s actions.
To reprocess records using the GraphQL tool
-
On the navigation pane, go to Consume > GraphQL.
- Enter a query to reprocess all records that belong to a certain entity type. Replace TrainingContact with the needed name of entity type.
{ search(query: "entityType:/TrainingContact") { entries { actions { postProcess } } } }
-
Execute the query.
You reprocessed all records that belong to a certain entity type. Now, the action from the rule is applied to those records.
To reprocess a record manually
-
Find and open the needed record.
-
In the upper-right corner of the record details page, select More > Reprocess entity.
You reprocessed the record. Now, you can view the result of an action performed by the rule.
-
To reprocess other records, repeat steps 1–2.
Change rule
After you created the rule, you can edit, inactivate, or delete it.
Edit rule
If you want to change the rule—name, description, filters, or actions—edit the rule.
To edit the rule
-
In the rule details page, make the needed changes.
-
Near the upper-right corner of the rule details page, select Save. If you edited filters or actions, the confirmation dialog appears where you have to decide what to do with the records associated with the rule.
-
In the confirmation dialog, do one of the following:
-
If you want to reprocess the records affected both by the previous and current rule configuration, select the checkbox, and then confirm your choice.
For example, in the previous configuration, the rule added the tag Prospect to all records of the TrainingContact entity type. If you edit the rule filter and change the entity type to Contact, then selecting the checkbox will remove the tag from the records of the TrainingContact entity type and add it to the records of the Contact entity type.
-
If you don’t want to reprocess the records affected both by the previous and current rule configuration, leave the checkbox unselected, and then confirm your choice. You can reprocess such records later. However, note that reprocessing via the rule details page applies only to the records matching the current rule configuration. To revert rule actions on records matching the previous rule configuration, you’ll need to reprocess such records via GraphQL or manually.
-
Inactivate rule
If you currently do not need the rule, but might need it in future, inactivate the rule.
To inactivate the rule
-
Open the rule.
-
Inactivate the rule by turning on the toggle next to the rule status.
You inactivated the rule, but the records to which the rule was applied still contain the changes made by the rule.
-
To return the records to which the rule was applied to their original state, reprocess the records.
Delete rule
If you no longer need the rule, delete it.
To delete the rule
-
Open the rule.
-
On the rule details page, select the delete icon, and then confirm that you want to delete the rule.
You deleted the rule, but the records to which the rule was applied still contain the changes made by the rule.
-
To return the records to which the rule was applied to their original state, reprocess the records.
Results
You learned the basic steps for creating rules to manage your records in CluedIn. You also learned how to apply the actions of the rule to the records associated with the rule.