Train your knowledge
Building Procedures the agent can run safely
Building Procedures that your agent can run safely is essential to ensure smooth, controlled interactions with customers while protecting your system and data. Procedures enable the agent to take specific actions during conversations, such as redirecting users, calling APIs, or running custom JavaScript. This article explains how to create and manage Procedures with safety and compliance in mind.
understanding Procedures and their types
Procedures are predefined actions the Customer Agent or Team Assistant can perform on behalf of a customer during a conversation. There are seven default types of Procedures:
- Suggest a follow-up question: Offers related questions the customer can click.
- Redirect to a URL: Sends the customer to a specific webpage.
- Start a component: Launches an interactive component like a video or form.
- Switch topic: Changes the conversation to a different knowledge area.
- Live chat: Transfers the conversation to a human agent.
- API call: Calls your backend endpoint and uses the response.
- Custom JavaScript: Runs arbitrary JavaScript code in the customer’s browser.
Each Procedure type serves different use cases, from simple navigation to complex backend integrations.
creating Procedures with safety in mind
When building Procedures, safety and control are paramount. The platform enforces permission boundaries so the agent only runs Procedures you have explicitly defined and authorized. Here are key points to ensure safe Procedure creation:
define clear triggers and variables
- Triggers determine when and where a Procedure appears. You can link Procedures to specific knowledge sources or set them to fire after negative feedback or unanswered questions. This prevents Procedures from running unexpectedly.
- Variables are inputs the Procedure needs, such as customer data or context. The agent collects these from the customer if not already known, ensuring the Procedure runs with accurate information.
limit irreversible actions
You decide which Procedures count as irreversible (actions that cannot be undone without human intervention). The agent will never perform irreversible actions without explicit customer approval, keeping a human in the loop and preventing unintended consequences.
use audit trails and accountability
Every Procedure run is recorded in an audit trail, showing what action was taken, when, and with what data. This transparency supports compliance and troubleshooting.
integrating custom logic safely
For advanced needs, you can build Custom Procedures that run JavaScript in the customer’s browser or call your backend APIs:
- Custom JavaScript Procedures run code only allowed by browser security policies. They are useful for tightly integrating with your product interface but cannot perform server-side actions.
- API call Procedures securely call your backend endpoints with configurable headers and authentication. You can transform API responses with JavaScript before presenting them to the customer.
Authentication credentials like bearer tokens are managed securely in your account settings, avoiding exposure in Procedure definitions.
best practices for safe Procedure management
- Start with standard Procedure types before moving to custom JavaScript or API calls.
- Use variables to collect only necessary data and validate inputs.
- Set clear triggers to control when Procedures are available.
- Mark escalation Procedures (like live chat) to track when human intervention is needed.
- Test Procedures thoroughly in Preview mode before going live.
- Monitor Procedure usage and customer reactions via conversation analytics.
compliance and permission boundaries
All agent actions, including Procedures, operate within strict permission boundaries you define. This ensures the agent cannot exceed its authorized scope. The system enforces these boundaries automatically, supporting GDPR compliance and operational security.
conclusion
Building safe Procedures for your agent involves careful configuration of triggers, variables, and permissions, combined with transparent audit trails and controlled escalation paths. By leveraging standard and custom Procedure types thoughtfully, you enable your agent to act autonomously within defined limits, enhancing customer interactions while maintaining full control and compliance.