This tutorial provides guidelines on how Admins can fetch data from multiple sources such as SFDC, MDA, and Data Spaces. This tutorial will guide you to perform actions using the Bionic Rule type (in Rules Engine) which has the capability to transform fetched data in various ways and execute actions with a single Bionic Rule. Users can perform Historical Rule Executions faster using Bionic Rules because of the data volume.
Before you start exploring how to create tasks in Bionic Rules, be sure to read the Getting Started with Bionic Rules article.
Fetch from SFDC, MDA, or Data Spaces
Navigate to Rules Engine > RULES LIST tab > +RULE. The Edit Rule screen will be displayed.
From the Rule Type drop-down list, select Bionic.
Select Account checkbox as Rule For.
Provide Rule Name.
Provide Description [Optional].
Click NEXT. You will be navigated to the Edit Rule screen.
Click DATASET TASK.
Select Native Data, Matrix Data, or Data Spaces from the drop-down list on the Setup Rule screen to get the data from SFDC, MDA (Redshift only), or Data Spaces.
Select Usage Data as the source object of Native Data.
Fetch the following Usage Data by dragging-dropping them in the Show section, as shown in the following image.
Enter the Task Name, Task Description, and Output Dataset Name.
Note: Output Dataset Name auto populates from Task Name and it can be changed to different name. It has no dependency on Task Name.
In this use case, the following details are used:
Task Name: Fetch from usage data [Maximum 80 characters and should be Alphanumeric; _ and space are supported]
Task Description: Usage data fetch [ Maximum 200 characters]
Output Dataset Name: Usage Data [Maximum 60 characters and should be Alphanumeric; _ and space are supported]. This gets pre-populated with the task name by default.
Click SAVE to create a task and query from Usage Data on the fields selected earlier. You can also add Filters. This task is now available for you to proceed further.
While creating tasks for Bionic Rules, you need to keep the following points in mind:
|Max # of tasks allowed||10|
|Max # of Show fields in each task||50||In Pivot task, we can pivot on a field using 200 cases|
|Max # of Group by fields in transformation tasks||5|
|Max # of filters allowed in each task||26||This limit is in filters of every task. But there are no limits in action filters|
- Fetch tasks support data sources from SFDC, MDA (Redshift Only), and Data Spaces.
- Each field in every task can have a field label input by the user which will be used as a field alias while querying and as a output header in the csv result. While querying from usage data, if any of these field aliases contains reserved keyword, you must modify the Output Field Label name before clicking SAVE, otherwise it displays the following error message.
The Date is a reserved keyword and you need to change it. You can simply click the gear icon available for this field to rename the Output Field label within the context of this Bionic Rule, as shown in the following image. The Output Header name will be modified based on whatever name you give to Output Field Label (space will be replaced with ‘_’). Once you save the task, the Output Header cannot be changed.
Note: In general, "Date" is one of the reserved keyword(s) for Output Field Label.
- Group by Date and DateTime includes various functions at Day, Week, Month, Quarter, and Year. You can add Date field in the GroupBy section in any of the Transform tasks (Aggregate/Pivot). For more information about custom grouping, refer to the Custom Grouping, Time Series, and Pivoting article.
Note: By default Created Date is set to Day, and aggregation is allowed, but for DateTime aggregation is not allowed which means there will not be any drop-down list available for this field in the Show section. When you add Date/DateTime field in the GroupBy section, it automatically gets added in the Show section and you can see the available options for the same field under the Show section only if you selected the function (in GroupBy section) which can be aggregated (refer the image below).
Earlier, you were not able to transform the data using Custom Rules. Transform tasks that are supported in Bionic Rule include Merge, Transformation, and Pivot. For more information about how you can transform data into a polished, actionable dataset in Bionic Rules using the Merge, Pivot, and Transformation options, refer the following articles.