// Add a new article by copying an item below and updating its title, date,
// category, excerpt, URL, and cover image. Categories are generated from the
// article data, so the filter buttons stay in sync as the collection changes.
const posts = [
{
title: "3Chat AgentRuntime: Designing an Agent Runtime for Conversational Marketing",
date: "2026-10-28",
category: "Technology",
excerpt: "An Agent Runtime Designed for Conversational Marketing. Most mainstream agent frameworks and runtimes are built around tasks: a user gives an instruction, and the agent works through a loop of",
url: "https://www.3chat.ai/blog/3chat-agentruntime-designing-an-agent-runtime-for-conversational-marketing",
cover: "https://cdn.sanity.io/images/f1joviv1/3chat-blog-data-intl/8c24c0ebfb1468e35de8fc7d6f9c57be9da6e450-11561x6480.png"
},
{
title: "30 Actionable WhatsApp Tips for 2025: Boost Your Strategy Today",
date: "2025-11-01",
category: "Daily Tips",
excerpt: "A practical collection of WhatsApp features, privacy settings, media workflows, and productivity tips for global e-commerce teams.",
url: "https://www.3chat.ai/blog/2025-whatsapp",
cover: "https://cdn.sanity.io/images/f1joviv1/3chat-blog-data-intl/80692a7e5897a95835b937cd97b54b67e33e9a3c-1024x576.avif"
},
{
title: "Omnichannel Setup: Integrating 3Chat.ai with WhatsApp",
date: "2025-10-13",
category: "How-to Guides",
excerpt: "Learn how to connect WhatsApp to 3Chat.ai, manage conversations in one inbox, and prepare your account and network before scanning the QR code.",
url: "https://www.3chat.ai/blog/omnichannel-3chat-ai-whatsapp",
cover: "https://cdn.sanity.io/images/f1joviv1/3chat-blog-data-intl/015b228fe8f4434126b9be6f0e4dd907239f30fd-1024x576.avif"
},
{
title: "Omnichannel Setup: Integrating 3Chat.ai with Facebook",
date: "2025-10-13",
category: "How-to Guides",
excerpt: "Follow the steps to connect a Facebook Business Account, authorize your Pages, and test Messenger conversations and Page comments in 3Chat.ai.",
url: "https://www.3chat.ai/blog/3chat-ai-facebook",
cover: "https://cdn.sanity.io/images/f1joviv1/3chat-blog-data-intl/8cc57484dcbc1343e13ed47f058ad857a890e7e8-1024x576.avif"
},
{
title: "Mastering Amazon Precision Operations: Integrating AI for Scalable Success",
date: "2025-10-11",
category: "Daily Tips",
excerpt: "Explore a practical operating system for Amazon sellers, from account health and customer service to reviews, ads, inventory, and AI-assisted growth.",
url: "https://www.3chat.ai/blog/in-depth-insight-amazon-refined-operation-integration-and-practice-of-ai-customer-service-tools",
cover: "https://cdn.sanity.io/images/f1joviv1/3chat-blog-data-intl/756ceb7c9829b37a10018bf18cf1d1c0699a6aae-1024x576.webp"
},
{
title: "Agentic AI: Game-Changing Tech or Just Marketing Hype?",
date: "2025-09-12",
category: "Deep Dives",
excerpt: "A grounded look at what Agentic AI means, how it differs from traditional automation, and where AI agents are already creating business value.",
url: "https://www.3chat.ai/blog/agentic-ai",
cover: "https://cdn.sanity.io/images/f1joviv1/3chat-blog-data-intl/0046169aee56e0f75a720689f4c36ff6264bfbca-1024x576.webp"
},
{
title: "E-commerce Growth Secrets: How to Skyrocket Conversions via WhatsApp",
date: "2025-09-08",
category: "Daily Tips",
excerpt: "Understand why WhatsApp matters for cross-border commerce and how AI-powered customer support can turn private conversations into long-term growth.",
url: "https://www.3chat.ai/blog/whatsapp-independent-site-conversions",
cover: "https://cdn.sanity.io/images/f1joviv1/3chat-blog-data-intl/6ddfaace52226c39e098318a433beb2a3a8be128-1024x576.avif"
},
{
title: "The Future of Support: How RAG, Agents, and MCP are Reimagining Customer Service",
date: "2025-08-19",
category: "Deep Dives",
excerpt: "A plain-language introduction to RAG, intelligent agents, function calling, and MCP—and how these technologies work together in customer support.",
url: "https://www.3chat.ai/blog/rag-agent-mcp-transforming-customer-service",
cover: "https://cdn.sanity.io/images/f1joviv1/3chat-blog-data-intl/cd0875d28a9c5f3c92480eaf6afa27354d8d3991-1024x576.avif"
}
];
const ALL_CATEGORY = "__all__";
const postList = document.querySelector("[data-post-list]");
const categoryList = document.querySelector("[data-category-list]");
const countLabel = document.querySelector("[data-post-count]");
const formatDate = (date) => new Intl.DateTimeFormat("en-US", {
year: "numeric",
month: "short",
day: "numeric"
}).format(new Date(`${date}T00:00:00`));
const categoryLabel = (category) => category;
// Derive filters from the current posts instead of maintaining a separate list.
const categories = [
ALL_CATEGORY,
...Array.from(new Set(posts.map((post) => post.category))).sort((a, b) => a.localeCompare(b))
];
function renderCategories(activeCategory = ALL_CATEGORY) {
categoryList.innerHTML = categories
.map((category) => `
`)
.join("");
categoryList.querySelectorAll("[data-category]").forEach((button) => {
button.addEventListener("click", () => renderPosts(button.dataset.category));
});
}
function renderPosts(activeCategory = ALL_CATEGORY) {
const visiblePosts = activeCategory === ALL_CATEGORY
? posts
: posts.filter((post) => post.category === activeCategory);
renderCategories(activeCategory);
countLabel.textContent = `${visiblePosts.length} articles`;
postList.innerHTML = visiblePosts.map((post) => `