How it Works
- User Request: “I want to book a call for next Tuesday.”
- Intent Detection: OpenAI analyzes the text and matches it to your defined function
book_appointment. - Data Extraction: The AI automatically extracts the required data (Date: “Next Tuesday”) from the conversation.
- Flow Trigger: The system executes a specific Chatbot Builder flow to handle the logic.
Configuration Guide
Access Functions Manager
- Navigate to Settings > Integrations.
- Click on Prompt Engineering (formerly OpenAI ChatGPT).
- Select the Functions tab and click Manage.
- Click Add to create a new function.
Define Function Details
- Name: Use a clear, action-oriented name (e.g.,
get_weather,book_demo).- Constraint: Use underscores
_instead of spaces. Avoid special characters like&orñ.
- Constraint: Use underscores
- Description (Critical): Explain what this function does in natural language.
- Format: “Allows the user to…”
- Example: “Allows the user to schedule a consultation call with our sales team.”
- Why? This description acts as the “prompt” for the AI to decide when to use this tool.
Set Parameters (Data Collection)
Define what information the AI needs to collect from the user before triggering the flow.
- Example: If the function is
shipping_quote, you might need:zip_code,weight,dimensions. - Behavior: The AI will conversationally ask the user for these details until it has them all.
Examples
Book Appointment
Name:
book_appointment
Description: Allows the user to schedule a meeting.
Data: date, email, reason
Output: “Appointment confirmed for - date.”Human Handoff
Name:
connect_human
Description: Allows the user to speak to a real person.
Data: (Leave blank if none needed)
Output: “Connecting you now…”Get Weather
Name:
get_weather
Description: Checks current weather conditions.
Data: city, state
Output: - weather_api_resultOrder Status
Name:
check_order
Description: Retrieves shipping status for a purchase.
Data: order_id
Output: shipping_statusEnabling the Function
Creating the function is step one. You must also attach it to your AI configuration:- Global Default: Go to Settings > Integrations > OpenAI and add it to your default assistant settings.
- Specific Action: Inside a specific OpenAI Action block in a flow, you can select which functions are available for that specific turn of the conversation.
