Collection Block

Make sure you’ve created at least one Collection before trying to use a Collection Block in a Workflow!

The Collection Block serves as the core component for querying Collections within Scout Workflows.

Configuration (Required)

Collection ID
stringRequired

The Collection ID is a unique identifier for the Collection you want to query. It ensures that the data retrieval is specific to the intended Collection and avoids any cross-data contamination.

You can select the Collection ID from a dropdown list of existing Collections, or enter it manually if necessary. If you need to find a Collection’s ID, your can copy it from the end of the URL when viewing your Collection. For example:

Limit
intRequired

The Limit setting specifies the maximum number of documents to retrieve from the Collection. This helps manage the amount of data processed in subsequent workflow steps and can improve performance by reducing the data load. Adjust this setting based on the specific needs of your task or application.

Minimum Similarity
floatRequired

The Minimum Similarity parameter determines the threshold for document similarity in the retrieval process. A value closer to 1 requires a higher similarity between the query and the document text, while a value closer to 0 allows for more lenient matches. This can be useful for tailoring the precision of your data retrieval.

Filter Collection (Optional)

Filtering a Collection allows you to narrow down the set of documents retrieved based on specific criteria. Filters utilize the metadata attributes defined within your documents, enabling precise and targeted data retrieval. You can add many Filters, each being called a Filter Item, with the following required attributes:

Key
stringRequired

The Key represents the metadata attribute you wish to filter by. This could be any metadata field defined in your documents, such as tags, categories, or custom attributes, allowing for targeted data retrieval.

Operator
selectRequired

The Operator defines the condition applied to the Key for filtering purposes. Common operators include ‘equals’, ‘contains’, ‘greater than’, and ‘less than’, among others. Selecting the appropriate operator is crucial for effectively narrowing down your data set.

Value
floatRequired

The Value is the specific criteria that the Key must meet, based on the Operator. This ensures that only documents matching the defined filter criteria are retrieved, allowing for precise and relevant data extraction.

Query (Required)

Query
stringRequired

The Query section allows you to define and customize the search parameters used to retrieve documents from the Collection. You can incorporate dynamic variables, utilize search operators, and set specific search terms to refine the data retrieval process. This flexibility enables the Collection Block to adapt to various use cases and data requirements.

See Workflow Logic & State > State Management for details on using {{dynamic variables}} within the Query input of the Collection Block.

Best Practices

  • Limit Data Volume: Use the Limit configuration to control the volume of data processed, thereby enhancing performance and efficiency in your workflows.
  • Test Queries: Regularly test and refine your queries to ensure they meet the desired outcome and adapt to any changes in your data or requirements.