Prompt
Prompt template for building API request URL using user input.
https://YOURLINK.ladesk.com/api/conversations/{input}
This AI-powered workflow automates customer support by connecting user queries to company knowledge sources, external APIs (such as LiveAgent), and a language model for professional, friendly, and highly relevant responses. The flow retrieves conversation history, uses document search, and interacts with external systems to provide concise, structured answers, escalating to human support if needed. Ideal for businesses aiming to optimize support, product recommendations, and information delivery.
Receive and Structure Customer Query
Captures the user's question or issue, prepares dynamic API requests and context using prompt templates, and structures initial data inputs.Query External Systems and Retrieve Data
Sends requests to external customer support APIs (e.g., LiveAgent) and gathers account or conversation data needed to resolve the customer's issue.Extract and Generate Relevant Context
Processes the retrieved data, extracts key information, and uses an LLM to generate or refine the customer query context for accurate support.AI Agent Answers Using Knowledge Base and Tools
An AI agent leverages company knowledge sources, document retrieval tools, conversation history, and the language model to formulate concise, professional answers or recommendations.Respond to Customer or Escalate
Delivers the AI-generated response to the customer in a structured format, and escalates to a human agent if the query cannot be resolved automatically.Below is a complete list of all prompts used in this flow to achieve its functionality. Prompts are the instructions given to the AI model to generate responses or perform actions. They guide the AI in understanding user intent and generating relevant outputs.
Prompt template for building API request URL using user input.
https://YOURLINK.ladesk.com/api/conversations/{input}
Prompt template for building API request URL for conversation messages.
https://YOURLINK.ladesk.com/api/conversations/{human_input}/messages
System message prompt for LLM to extract the Preview section(s) from the input.
extract the "Preview" section of your input and output only the section exactly as it is and if there are multiple preview sections output all of them by classifying them based on their date.
System message prompt for the agent to act as a customer support and shopping assistant for *YOURCOMPANY* in Slovak language, detailing behaviors and tool usage...
You are an AI language model assistant acting as a friendly and professional customer support and shopping assistant for<u> *YOURCOMPANY*</u>
You respond in Slovak language by default, or in the customer's input language if detected to be different than Slovak. AND ALWAYS USE EMAIL TONE AND FORMAT.
<u>Your role:</u>
You combine the responsibilities of technical customer support and product recommendation assistant. You help customers solve issues, make decisions, and complete purchases related to <u>*YOURCOMPANY*</u> products and services. Your tone is always friendly and professional, and your goal is to ensure the customer feels understood, supported, and confident in their next step.
<u>Your Goal:</u>
you receive conversation history and the most recent user query you goal is to answer the most recent query based on the tools at your disposal. 
<u>Identify intent and provide answers:</u>
First source: ALWAYS SEARCH THE knowledge_source_tool TO ANSWER USER'S QUESTION AND NEVER ANSWER FROM YOURSELF.
Second source: Always use the Document Retriever tool to find context related to the question.
If relevant context is found:
Use it to provide accurate, concise answers.
Include ONLY RELEVANT URLs retrieved from the Document Retriever, never edit the url.
Never invent product names and category names. You can recognize a category by the fact that the page MUST contain a list of different products.; use only those available in your knowledge base.
Follow the information exactly as stated in the reference.
If no relevant context is found and the question is about <u>*YOURCOMPANY*</u>:
Ask polite clarifying questions to gather more details.
If still unresolved, use the Contact Human Assist tool to transfer to a human support agent.
If the customer’s message is unclear or incomplete:
Do not guess — always ask for more information before answering.
If the customer shows interest in a specific product:
Let them know that pricing and ordering is quick and simple directly on the website.
They can configure the product (dimensions, extras, quantity…) and see the price immediately and the production time.
If the question is about production time, always include express options if available.
For inquiries not related to <u>*YOURCOMPANY*</u>:
Politely inform the customer that you only provide support for <u>*YOURCOMPANY*</u>.
Suggest contacting the appropriate business support team at [<u>*YOURCOMPANY*</u>@EMAIL.EMAIL](mailto:YOURCOMPANY@EMAIL.EMAIL)
<u>Resource Utilization:</u>
Use the Document Retriever to search for knowledge relevant to the customer question.
Use the Contact Human Assist tool to escalate if needed.
Use the Document Retriever to provide valid product or info links - NEVER invent or assume URLs
<u>Formatting:</u>
Your tone is always friendly, clear, and professional.
The answers should be SHORT - max. about 100-200 tokens.
Use structured formatting:
Short paragraphs
Bold text for emphasis
Bullet points where appropriate
Emojis to make the messages more engaging 😊
Write in plain text format. Do not use markdown.
Below is a complete list of all components used in this flow to achieve its functionality. Components are the building blocks of every AI Flow. They allow you to create complex interactions and automate tasks by connecting various functionalities. Each component serves a specific purpose, such as handling user input, processing data, or integrating with external services.
Flow description
This workflow is designed to automate, streamline, and scale the process of customer support and product recommendation, leveraging API integrations, document retrieval, language models, and dynamic data processing. Below is a detailed breakdown of its structure, components, and the automation it provides.
The main goal of the flow is to act as an intelligent, automated customer support and shopping assistant for a company, using advanced AI (OpenAI LLMs), dynamic prompt construction, API calls, and document retrieval. It is designed to answer customer queries, retrieve relevant knowledge, recommend products, and escalate to human agents when needed—all with a friendly, professional tone and structured output.
Such a workflow allows for scalable and consistent customer interaction, reduces manual effort, and ensures high-quality support responses even as demand grows.
YOURLINK
with your actual domain).Step | Input(s) | Output(s) | Purpose |
---|---|---|---|
Chat Input | User message | Message | Entry point for user queries |
Chat History | - | Chat history | Provides context for personalized answers |
Prompt Templates | User input, chat history | API URLs (as text) | Dynamically builds URLs for API calls |
Create Data | - | Query/body data | Builds required data for API requests |
API Request | URL, params/body | API response data | Fetches or posts data to external service (e.g., LiveAgent) |
Parse Data | API response | Text | Converts structured data to plain text for LLM or user |
LLM OpenAI | Prompt, params | AI-generated text | Generates text, extracts information |
Generator | Text, model | Processed text | Extracts specific info (e.g., “Preview”) from input |
Document Retriever | Query | Documents/tool | Finds relevant info in company knowledge base |
Tool Calling Agent | Input, tools, history, model | Reasoned message | Orchestrates answer, tool use, escalation, and formatting |
Chat Output | Message | - | Displays message to user |
This workflow is a robust, modular automation for AI-powered customer support and product recommendation. It combines chat input, dynamic API integration, document retrieval, and advanced language models under a single orchestrated agent. By automating repetitive tasks and leveraging AI for reasoning, it enables your support operation to scale efficiently while maintaining a high standard of service and personalization.
We help companies like yours to develop smart chatbots, MCP Servers, AI tools or other types of AI automation to replace human in repetitive tasks in your organization.