Table of Contents

Getting started with TMS FNC WhatsApp Receiver

Prerequisites

  • TMS FNC Core and TMS FNC WebSocket installed and the runtime packages added to the project.
  • A WhatsApp Business API account and a configured webhook URL pointing to your server.

Add the component

  1. Drop TTMSFNCWhatsAppReceiver from the TMS FNC WebSocket palette page onto a form, or create one at runtime.
  2. Set Port to the port your webhook relay listens on.
  3. Set Active := True to start receiving, or call Start from code.

Handle incoming messages

{ Assign OnWhatsAppMessageReceived to process incoming WhatsApp messages: }
procedure TForm1.WhatsAppReceiver1WhatsAppMessageReceived(Sender: TObject;
  AMessage: TTMSFNCWhatsAppReceiverMessage);
begin
  Memo1.Lines.Add('From: ' + AMessage.From.PhoneNumber);
  if Assigned(AMessage.Text) then
    Memo1.Lines.Add('Text: ' + AMessage.Text.Body);
end;

Next steps

  • Guides — message types, media handling, and contact parsing.
  • API reference — full class, property, method, and event reference.