Skip to contentSkip to navigationSkip to topbar

Manually queue a rule execution


(information)

Legal information

Conversation Intelligence, including the APIs, may use artificial intelligence or machine learning technologies and is subject to the terms of the Predictive and Generative AI/ML Features Addendum(link takes you to an external page). For more details on AI usage and data, see AI Nutrition Facts for Conversation Intelligence.

Conversation Intelligence is not PCI compliant or a HIPAA Eligible Service and should not be used in workflows that are subject to HIPAA or PCI.

Conversations products are only available in the new Twilio Console(link takes you to an external page). If your account hasn't been migrated, you'll be redirected to the legacy Console where these products won't appear.

(new)

Private beta

On-demand Rule Execution for Conversation Intelligence, including the API, is currently available as a private beta release and the information contained in this document is subject to change. You acknowledge and agree that your use of On-demand Rule Execution is subject to the terms of the Services in Private Beta(link takes you to an external page). As a private beta release, On-demand Rule Execution is made available to a limited number of customers for testing purposes only and should not be used in production environments or use real customer data. Some features are not yet implemented and others may be changed before the product is declared as generally available. Private beta products are not covered by the Twilio Support Terms or Twilio Service Level Agreement.

On-demand Rule Execution is not PCI compliant or a HIPAA Eligible Service and should not be used in workflows that are subject to HIPAA or PCI.

On-demand Rule Execution is available through the API only. To request access, contact Twilio Support(link takes you to an external page) or your Twilio account manager.

POST/v3/RuleExecutions

Base url: https://intelligence.twilio.com (Twilio Intelligence API)

Resolves the given configuration, rule, and conversation, derives the memoryStoreId from the conversation's configuration. Then executes the rule on the conversation.


Request

create-rule-execution-request page anchor

Authentication

authentication page anchor
Encoding type:application/json
Schema
Property nameTypeRequiredPIIDescriptionChild properties
intelligenceConfigurationIdstring
required
Not PII

The Intelligence Configuration identifier to execute the Rule within.

Example: intelligence_configuration_01k6fc25s7epm9qtk8rszbv3q5Pattern: ^intelligence_configuration_[0-7][0-9a-z]{25}$

ruleIdstring
required

The rule identifier to execute within the selected Intelligence Configuration.

Example: intelligence_configurationrule_01k6fc25s7epm9qtk8rszbv3q6Pattern: ^intelligence_configurationrule_[0-7][0-9a-z]{25}$

conversationIdstring
required

The Conversation identifier to execute the Rule against.

Example: conv_conversation_01k1etk2y5f1y9fpe2epfdtvv2Pattern: ^conv_conversation_[0-7][0-9a-z]{25}$

202400404422429500

Rule execution queued.

Manually queue a rule executionLink to code sample: Manually queue a rule execution
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function createRuleExecution() {
11
const ruleExecution = await client.intelligence.v3.ruleExecutions.create({
12
intelligenceConfigurationId:
13
"intelligence_configuration_01k6fc25s7epm9qtk8rszbv3q5",
14
ruleId: "intelligence_configurationrule_01k6fc25s7epm9qtk8rszbv3q6",
15
conversationId: "conv_conversation_01k1etk2y5f1y9fpe2epfdtvv2",
16
});
17
18
console.log(ruleExecution);
19
}
20
21
createRuleExecution();