Maciej
Maciej

Reputation: 10805

WhatsApp chats real time recording

I have requirement from compilance to backup my business WA users chats (for reasonable price...) Ive googled a lot and seems (correct me if Im wrong) only solution is to build own chat app (or use app delivered by API provider)

I've checked eg twilio, 360dialog, chat-api
I played a bit witch twilio and I know how to save incoming messages (sent by eg client), but not outgoing (sent by my users)
Also I know how to send WA msgs from my own app (so I can record those)

But my preference would be users to use WA on mobile phones or WA web and listen some hooks to record that.
Any idea how to implement that? Maybe WA buisness API can do that?

Upvotes: 2

Views: 1495

Answers (1)

turivishal
turivishal

Reputation: 36104

There is no straight way to do this using WhatsApp Business APIs,

You need to record both the messages in one place/table/collection whether it is sent from our business phone number or received from the clients/users.

We can do it but have to use proper logic, let's see both the scenario and how to record it in one place/table/collection,

Send Message from WhatsApp Business API (from our business phone number) to clients/users:

You can record the message whenever Business sends any message to clients/users because Webhook does not give that sent message content, yes it will notify us about status updates like sent, delivered, read, failed, etc.

Things we can record:

  • Message ID (This is important, you will get in response whenever we send a message from Business API)
  • From Phone Number (Business phone number)
  • Message Content
  • To Phone Number (Client/user phone number)
  • Message Status (sent, read, delivered, failed)
  • Sent Date
  • Updated Date (updated message status date)
  • Type (from business)

Receive Messages from clients/users to our Business Phone Number:

You can get message content from Webhook, so we can record that received message content object in our table/collection,

Things we can record:

  • Message ID (This is important, Get in Webhook)
  • From Phone Number (Client/User phone number)
  • Message Content
  • To Phone Number (Business phone number)
  • Message Status (sent, read, delivered, failed)
  • Sent Date (message received date)
  • Updated Date (updated message status date)
  • Type (from user/client)

Other Things that I am not sure about:

  • We can't get message content If a Business phone number sends a message to a client/user from WhatsApp Business App.

Upvotes: 4

Related Questions