System tools are built-in features that help Optimizely Opal take action. Each tool performs a specific task, such as creating a campaign, uploading files, or generating images. Think of tools like attachments on a Swiss Army knife. Each one has a distinct purpose that helps you get work done.
In addition to the system tools available in Opal, Optimizely Graph includes a set of system tools to help you with Content Management System-related tasks, such as managing content.
Click a tool's name to expand it and learn when to use it, its required and optional parameters, and example prompts to calling the tool. If you do not provide a required parameter, Opal prompts you for it.
graph_content_type_schema – Use as your starting point for understanding the content structure within your Optimizely Graph instance. The tool lets you and Opal discover available content types and their fields, which is crucial for constructing accurate GraphQL queries.
-
When to use
- To explore available content – If you want to know what types of content (for example, articles, products, pages) are stored in your Optimizely Graph instance.
- To understand content structure – If you need to see the fields and properties associated with a specific content type before querying it.
-
To build GraphQL queries – If you need the exact content type names and field names for use with the
graph_content_graphql_executortool.
-
Parameters
- (Optional)
searchPhrase– A text string to filter content types that are relevant to your question, for example, "news article" or "product details". If left empty, all content types are returned. - (Optional)
itemMinimumScore– The minimum score for items to be considered relevant based on the search phrase. - (Optional)
contentTypeFacetLimit– The maximum number of content types to return from the facet.
- (Optional)
-
Example prompts
- What content types are available in Optimizely Graph?
- Show me the schema for content types related to 'blog posts'.
- I want to see all content types and their fields that are relevant to 'products'.
- Can you list content types that might contain information about 'customer reviews'?
graph_content_graphql_executor – Execute custom GraphQL queries against your Optimizely Graph instance. You can retrieve specific content items, filter results, sort, and get aggregated data (facets).
-
When to use
- To retrieve specific content items – If you need to fetch detailed data for articles, products, pages, or any other content type.
- To filter content based on criteria – If you want to find content that matches certain conditions, for example, articles published within a date range or products with a specific tag.
- To sort content results – If you need to order content by fields like publication date, title, or price.
-
To paginate through large datasets – If you need to retrieve content in chunks using
skipandlimit. - To get aggregated data (facets) – If you want to count occurrences of values within a field, for example, the number of articles per author or products per category.
-
Parameters
-
query– The GraphQL query to execute. - (Optional)
variablesAsJson– A JSON string representing variables for the GraphQL query.
-
-
Example prompts
- Get the titles and descriptions of all 'NewsArticle' content types.
- Find all 'Product' content types where the 'price' is greater than 50 and less than 100, and order them by price in ascending order. Also, show me the 'name' and 'sku' of these products.
- Count how many 'BlogPosts' were published each month in 2024, and list their titles.
graph_content_search_tool – Use as a simpler alternative for searching content in Optimizely Graph when constructing complex GraphQL queries might be excessive. It lets you search for content based on a search phrase across a specified content type.
-
When to use
- For simple keyword searches – If you need to find content items that contain a specific phrase or keyword.
- When you know the content type – If you are looking for content within a known content type, for example, Search for 'summer sale' in 'Promotions'.
-
As a quick lookup – If the
graph_content_graphql_executortool seems too complex or overextravagant for your immediate need.
-
Parameters:
-
searchPhrase– The search phrase to use when searching for content. - (Optional)
contentTypeName– The specific content type to search within, for example, "Article" or "Product". If not provided, it defaults to "Data" (which might search across various types depending on configuration). -
(Optional)
outputFieldsAsGraphQLOutput– The specific fields you want to retrieve for the matching content items, in GraphQL output format. If not provided, it defaults to_fulltext. For example, the following:"id name createdBy { id name }"
-
-
Example prompts
- Search for 'holiday promotions' in the 'Campaign' content type.
- Find any 'Article' content that mentions 'customer experience' and return their titles and URLs.
- What 'Product' content contains the phrase 'new features'?
- Show me all content related to 'Optimizely DXP'.
Article is closed for comments.