Manually queue a rule execution
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. 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. If your account hasn't been migrated, you'll be redirected to the legacy Console where these products won't appear.
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. 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 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.
application/jsonThe Intelligence Configuration identifier to execute the Rule within.
intelligence_configuration_01k6fc25s7epm9qtk8rszbv3q5Pattern: ^intelligence_configuration_[0-7][0-9a-z]{25}$The rule identifier to execute within the selected Intelligence Configuration.
intelligence_configurationrule_01k6fc25s7epm9qtk8rszbv3q6Pattern: ^intelligence_configurationrule_[0-7][0-9a-z]{25}$The Conversation identifier to execute the Rule against.
conv_conversation_01k1etk2y5f1y9fpe2epfdtvv2Pattern: ^conv_conversation_[0-7][0-9a-z]{25}$Rule execution queued.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function createRuleExecution() {11const ruleExecution = await client.intelligence.v3.ruleExecutions.create({12intelligenceConfigurationId:13"intelligence_configuration_01k6fc25s7epm9qtk8rszbv3q5",14ruleId: "intelligence_configurationrule_01k6fc25s7epm9qtk8rszbv3q6",15conversationId: "conv_conversation_01k1etk2y5f1y9fpe2epfdtvv2",16});1718console.log(ruleExecution);19}2021createRuleExecution();