Create Custom Rule Actions with the API
| Component | Name |
|---|---|
| Query pipeline | custom-rule-pipeline |
| Custom rule type | custom-rule-type |
| Rule | custom-rule-action |
custom-rule-pipeline, that is used to complete the rule action.custom-rule-type, that uses your query pipeline. Here are some important parameters to include in your POST request.schema</code, define the values required from the user to create a rule that uses the custom rule type.| Required | Parameter | Description | Example |
|---|---|---|---|
id | A unique ID for the custom rule type. The id value must be
unique across all apps in Managed Fusion (global namespace). | custom-rule-type | |
pipeline_id | The ID of the pipeline that is invoked during rule processing. | custom-rule-pipeline | |
display_type | A user-friendly name for the custom rule type. | My Custom Rule | |
custom_param1 | The ID of the rule’s parameter. This field is used in the API but is not visible in the Rules Editor. | 1st-rule-parameter | |
type | The type of user-input. | string | |
title | A user-friendly name for the parameter. | Manufacturer | |
description | A user-friendly description of what the field is used for. The
description value is shown in the field’s tooltip in the Rules Editor. | The manufacturer of the product to which this rule applies. |
https://EXAMPLE_COMPANY.b.lucidworks.cloud/api/apps/myFusionApp/custom-rule-types. Custom rule types are also available in the Rules Editor:
custom-rule-action, that uses your custom rule, custom-rule-type. If you are creating the rule using the Query Rewrite API, the following image depicts which parameters are shared between the custom rule type and the rule:
id value is used for the rule’s type and custom_type fields. Remember to assign values to the custom rule properties, custom_param1 and custom_param2.123456, with the Query Rewrite API: https://EXAMPLE_COMPANY.b.lucidworks.cloud/api/apps/myFusionApp/query-rewrite/instances/123456| Required | Parameter | Description | Example |
|---|---|---|---|
| ✅ | id | A unique ID for the custom rule type. The id value must be unique across all apps in Managed Fusion (global namespace). | custom-rule-type |
| ✅ | pipeline_id | The ID of the pipeline that is invoked during rule processing. | custom-rule-pipeline |
| ✅ | display_type | A user-friendly name for the custom rule type. | My Custom Rule |
schema, define the values required from the user to create a rule that uses the custom rule type.
| Required | Parameter | Description | Example |
|---|---|---|---|
| ✅ | custom_param1 | The ID of the rule’s parameter. This field is used in the API but is not visible in the Rules Editor. | 1st-rule-parameter |
| ✅ | type | The type of user-input. | string |
| ✅ | title | A user-friendly name for the parameter. | Manufacturer |
| ✅ | description | A user-friendly description of what the field is used for. The description value is shown in the field’s tooltip in the Rules Editor. | The manufacturer of the product this rule action applies to. |