In addition to the pre-built facts, you can also create your own Custom Facts. Custom facts are required when additional data is required to create more customized campaign rules. For example, if you are creating a new coupon code, you can create a new "Coupon Code" entity and create the various facts under the entity such as CouponCodeInfo, RedeemCoupon, and so on depending on the requirement.
To create a new fact, navigate to the Data Settings page. To access the data settings, select "Manage" under your profile name on the top right corner of the 99minds app.
In this page, under the "Data" tab, click Facts from the left sub-menu. You will see the list of pre-defined facts that are listed below. To create a new fact, click the + New Fact button.
- Fact Name - The actual name (key) of the fact. Remember to provide a meaningful key for the fact as this will be used in the Rule Builder and visible under the Facts Library section. The fact name should be expressed as camelCase - example: orderTotal, cartValue etc.,
- Label - Enter a label for the fact that will be displayed
- Fact Type - Select the data type of the fact from the list. The available data types are String, Number, Boolean, Time, Date, DateTime, GeoLocation, Audience, List.
- Entity - Select the entity that will contain this new fact from the list. The drop down will list the pre-defined entities in the 99minds app. To create a New Entity, refer the next section.
- Description - An optional description for the fact explaining the need for this fact
- Save - Click the Save button to create the new fact. The newly created fact will automatically be added to the fact library.
The Facts Library lists the available facts that can be used within your integration. Facts must be connected to your integration and active in order to use them in the Rule Builder. You can add facts from the pre-defined list from the left side of the page or create your own custom facts (explained in the previous section) that are specific to your business. You can filter the available facts based on the Entities. Select the entity from the dropdown. This will only list the facts specific to the entity.
Editing a Fact
All pre-defined and newly created facts can be edited by clicking the Edit button. In the Edit screen, you can modify the fact name, label, fact type, entity and description. In addition, there is a new field "Fact Options" where you can add a new tag for the fact. Click Update to update the fact details.
The search functionality can be used to search for a specific fact based on the fact name or fact reference number. Every fact created will have a reference number associated with it. Users can search for the fact with this reference number.