Optimizely Rule Clauses API
The Rule Clauses API from Optimizely — 15 operation(s) for rule clauses.
Operations 19
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Ask an LLM
“Which rule clauses are configured across my commerce rules?”
“Can I filter rule clauses by criteria type and sort them by execution order?”
Tell an agent
List all rule clauses.
List rule clauses matching {filter}, ordered by {orderby}.
Ask an LLM
“How do I add a new condition clause to a promotion or shipping rule?”
“What comparison operators and values does a new rule clause need?”
Tell an agent
Create a rule clause for rule manager {ruleManagerId} checking {criteriaObject}.{criteriaProperty} {comparisonOperator} {simpleValue}.
Add a new rule clause of criteria type {criteriaType} with value range {valueMinimum} to {valueMaximum}.
GET
/api/v1/admin/RuleClauses({id})
Get a rule clause · Returns the entity with the key from RuleClauses
#
Ask an LLM
“How do I look up the condition and values of one specific rule clause?”
“What does a single rule clause compare against?”
Tell an agent
Get rule clause {id}.
Show the criteria and operator of rule clause {id}.
PUT
/api/v1/admin/RuleClauses({id})
Replace a rule clause · Replace entity in EntitySet RuleClauses
#
Ask an LLM
“How do I overwrite an entire rule clause definition in one call?”
“Does replacing a rule clause require resending every criteria field?”
Tell an agent
Replace rule clause {id} with criteria {criteriaObject}.{criteriaProperty} {comparisonOperator} {simpleValue}.
Fully overwrite rule clause {id} with value list {valueList}.
DELETE
/api/v1/admin/RuleClauses({id})
Delete a rule clause · Delete entity in EntitySet RuleClauses
#
Ask an LLM
“How do I remove one condition from a rule?”
“Can I delete a rule clause only if its ETag hasn't changed?”
Tell an agent destructive · confirm first
Delete rule clause {id}.
Delete rule clause {id} if its ETag is {etag}.
PATCH
/api/v1/admin/RuleClauses({id})
Update a rule clause · Update entity in EntitySet RuleClauses
#
Ask an LLM
“How do I change just the comparison value on an existing rule clause?”
“Can I move a rule clause to a different execution group or order?”
Tell an agent
Change the simple value of rule clause {id} to {simpleValue}.
Set execution order of rule clause {id} to {executionOrder} in group {executionGroup}.
GET
/api/v1/admin/RuleClauses/Default.Default()
Get the default rule clause template · Call operation Default
#
Ask an LLM
“What default values does a brand-new rule clause start with?”
“Where can I get a blank rule clause record to fill in?”
Tell an agent
Get the default rule clause template.
Show default values for a new rule clause.
POST
/api/v1/admin/RuleClauses({id})/Default.import
Import products into a rule clause · Call operation import
#
Ask an LLM
“How do I bulk import a product list into a rule clause condition?”
“Can I load products into a rule clause by its id through the OData action?”
Tell an agent
Import products into rule clause {id}.
Run the product import action on rule clause {id}.
POST
/api/v1/admin/RuleClauses({id})/Default.importcustomers
Import customers into a rule clause · Call operation importcustomers
#
Ask an LLM
“How do I bulk import customers into a rule clause condition?”
“Can I load a customer list into a rule clause by its id through the OData action?”
Tell an agent
Import customers into rule clause {id}.
Run the customer import action on rule clause {id}.
POST
/api/v1/admin/RuleClauses/Default.createtemporary
Create a temporary rule clause copy · Call operation createtemporary
#
Ask an LLM
“How do I create a temporary working copy of a rule clause before editing it?”
“Can I start a temporary rule clause from an existing one for a given rule type option?”
Tell an agent
Create a temporary rule clause for rule type {ruleTypeId} and option {ruleTypeOptionId}.
Make a temporary copy of rule clause {existingRuleClauseId} for rule type {ruleTypeId}, option {ruleTypeOptionId}.
POST
/api/v1/admin/RuleClauses/Default.copyfromtemporary
Apply a temporary rule clause · Call operation copyfromtemporary
#
Ask an LLM
“How do I save my temporary rule clause edits back onto the real clause?”
“Can I copy a temporary rule clause over a target rule clause?”
Tell an agent
Copy temporary rule clause {tempRuleClauseId} onto rule clause {targetRuleClauseId}.
Apply temp clause {tempRuleClauseId} to target {targetRuleClauseId} for entity {entityName}.
POST
/api/v1/admin/ruleclauses/copyfromtemporary
Apply a temporary rule clause (route form) · Rule clauses copy from temporary 2
#
Ask an LLM
“Is there a plain-route copyfromtemporary endpoint for rule clauses besides the OData action?”
“What's the non-OData route for committing a temporary rule clause?”
Tell an agent
Call the ruleclauses/copyfromtemporary route to commit a temporary rule clause.
Use the plain route, not the OData action, to copy a temporary rule clause back.
POST
/api/v1/admin/ruleclauses/createtemporary
Create a temporary rule clause (route form) · Rule clauses create temporary async 2
#
Ask an LLM
“Is there a plain-route createtemporary endpoint for rule clauses?”
“What's the non-OData route for starting a temporary rule clause?”
Tell an agent
Call the ruleclauses/createtemporary route to start a temporary rule clause.
Use the plain route, not the OData action, to create a temporary rule clause.
POST
/api/v1/admin/ruleclauses({key})/import
Import products into a rule clause by key · Rule clauses import products async by key
#
Ask an LLM
“How do I import products into a rule clause using the plain key-based route?”
“Is there a non-OData import route for rule clause products?”
Tell an agent
Import products into rule clause with key {key} via the plain route.
Run ruleclauses({key})/import to load products.
POST
/api/v1/admin/ruleclauses({key})/importcustomers
Import customers into a rule clause by key · Rule clauses import customers async by key
#
Ask an LLM
“Which route bulk-loads a customer list into a rule clause addressed by key?”
“Is there a non-OData importcustomers route for rule clauses?”
Tell an agent
Import customers into rule clause with key {key} via the plain route.
Run ruleclauses({key})/importcustomers to load customers.
Ask an LLM
“How do I delete several rule clauses at once by their ids?”
“Can I remove a batch of rule clauses in one request?”
Tell an agent destructive · confirm first
Delete rule clauses {ids}.
Bulk remove the rule clauses with ids {ids}.
GET
/api/v1/admin/ruleclauses({key})/customers({customerKey})
Get a customer attached to a rule clause · Rule clauses get customer by key and customerkey
#
Ask an LLM
“How do I check whether a specific customer is part of a rule clause?”
“Can I fetch one customer record linked to a rule clause?”
Tell an agent
Get customer {customerKey} on rule clause {key}.
Show the customer {customerKey} attached to rule clause {key}.
GET
/api/v1/admin/ruleclauses({key})/customproperties({custompropertyKey})
Get a rule clause custom property · Rule clauses get custom property by key and custompropertykey
#
Ask an LLM
“How do I read a custom property stored on a rule clause?”
“Where do I find one custom property value for a rule clause?”
Tell an agent
Get custom property {custompropertyKey} of rule clause {key}.
Show rule clause {key}'s custom property {custompropertyKey}.
GET
/api/v1/admin/ruleclauses({key})/products({productKey})
Get a product attached to a rule clause · Rule clauses get product by key and productkey
#
Ask an LLM
“How do I check whether a specific product is included in a rule clause?”
“Can I fetch one product record linked to a rule clause?”
Tell an agent
Get product {productKey} on rule clause {key}.
Show the product {productKey} attached to rule clause {key}.