Skip to main content

Add the ‘Delete Knowledge’ Tool step to your Tool

You can add the ‘Delete Knowledge’ Tool step to your Tool by:
  1. Creating a new Tool, then clicking + Add Step
  2. Searching for and adding the ‘Delete Knowledge’ Tool step
  3. Clicking ‘Expand’ to see the full Tool step
  4. Selecting the knowledge table you would like to access
  5. Filter condition: “and” vs “or” when matching data to delete:
    • Use and when all specified conditions must match for a row to be deleted.
    • Use or when any of the conditions can match.
    Filter condition only applies if you include more than one object in the filter
  6. Filters: Accepts a JSON selection of objects, where each object corresponds to a row. Add more objects as outlined in the formatting examples below to delete multiple rows at once.
  7. Click Run step to test out the Tool

Common errors

This indicates that there is a formatting issue in the “Filters” input field. Make sure your object is formatted correctly. Expected property name or '}' in JSON at...
This means the Filter being used is not a JSON. Invalid JSON

Formatting Examples

Example 1: Delete single condition

// All poodles will be deleted
[
  {
    "breed": "poodle"
  }
]

Example 2: Delete single condition

// All small poodles will be deleted
[
  {
    "breed": "poodle",
	"size": "small"
  }
]

Example 3: Delete multiple conditions (or)

// All small poodles will be deleted AND any dog aged 4 will be deleted
[
  {
    "breed": "poodle",
    "size": "small"
  }, 
  {
    "age": 4
  }
]

Example 3: Delete multiple conditions (and)

// Only small poodles that are aged 4 will be deleted
[
  {
    "breed": "poodle",
    "size": "small"
  }, 
  {
    "age": 4
  }
]
Ensure to separate each object with a comma if inserting multiple rows.

Using Variables in JSON

You can use variables from Tool inputs and other Tool steps in the Filters field. For detailed information on how to use variables in JSON for Knowledge Tool steps, including variable syntax and typing, see Using Variables in JSON. For Knowledge Tool steps, all variables should be wrapped in quotes in the JSON format: "{{variable_name}}". The filter values will be matched against your knowledge table data based on the column types.

Frequently asked questions (FAQs)

  • Use AND when all filter conditions must be true for a row to be deleted.
  • Use OR when any one of the conditions can match.
This only applies when you include more than one object in the filter array.
Yes. Any row that matches the filter condition you have specified will be deleted.
If no rows match the provided conditions, no data will be deleted. Make sure your filter values exactly match the data in the knowledge set (e.g., casing, field names, etc.).