Application of Function Calling in an AI Chatbot for Automating Reservation Services via Instagram Direct Messages: A Case Study of a Baby Spa Clinic

Authors

  • Triyono Triyono Universitas Duta Bangsa Surakarta, Indonesia
  • Pipin Widyaningsih Universitas Duta Bangsa Surakarta
  • Dewi Anggraini Universitas Duta Bangsa Surakarta, Indonesia
  • Arvanda Nuraini Universitas Duta Bangsa Surakarta, Indonesia

DOI:

https://doi.org/10.62411/tc.v25i4.18160

Abstract

This study examines function calling for Instagram reservation inquiries in a Baby Spa application. The audited implementation uses Next.js, Prisma/MySQL, the Repliz API and a configurable OpenAI-compatible language-model endpoint. Five functions retrieve clinic information, availability, account status and customer-service contacts, or create a PENDING reservation for operator review. The orchestrator processes up to ten chats per invocation, retains fifteen messages per chat and allows five model iterations. Code inspection identifies a daily cron schedule, which cannot support timely automatic replies. The original five scenarios document functional coverage, but their exact model configuration was not retained. A supplementary analysis of 330 records from 55 scenarios, three prompt versions and two recorded model identifiers provides quantitative evidence. With the final prompt, intent-label agreement and recorded function-calling success were 100% and 93.6% for the gateway identifier gemini/gemini-3.5-flash-lite, and 83.6% and 68.1% for gpt-4o-mini. Mean recorded processing durations were 3.09 s and 2.68 s, respectively. These durations exclude Instagram delivery and polling delay; end-to-end latency remains unmeasured. The findings support functional feasibility while identifying scheduling, validation and reproducibility limitations.   Keywords - function calling; chatbot; Instagram Direct Message; clinic reservation; large language model; Repliz; Next.js

Downloads

Published

2026-11-30