WhatsApp is the one of the most used messaging systems so I thought it would be a good idea to have the chance to send messages from BC.
So, I have the idea, now, how we can do it? And why?
How to do it?
First of all, I made a little research about how to send WhatsApp messages.
I found 2 possible ways. Using the public URL (the selected one) or using WhatsApp Business API.
So, why I choose the first one. The easy answer it's that it's 100% functional for a demo. In fact, for using WhatsApp Business API I should register as a company, wait for WhatsApp / Facebook response so maybe for another post in the future.
Why?
The night I'd decided to do it I started thinking where to use it. I was in bed and my head was thinking (when I really wanted to sleep...) so many different cases. I'll give you some ideas:
- Send a message to a customer when shipment is done in the warehouse.
- Also, can send tracking ID if you'll have it.
- Reminders
- All kind of reminders
- CRM
- Send messages to contacts / customers with promotions, offers, etc.
- Employees
- Any message you can imagine to your employees.
So, now I have the idea and where to use. Let's try it (after sleep).
Development
Next morning (currently on my Summer Holidays) I tried to move my ideas to AL code. My first idea is always try to make it simple and proof that it works. Once there, make it nice.
Of course, problems start appearing...
First problem. WhatsApp URL don't allow to send messages directly. It always opens a web browser and the Desktop app. And user must press send... So, the idea of automatizing everything it's only available if using WhatsApp Business API.
Second problem. Phone No. format. BC allows you to store numbers and symbols on Phone No. field, but WhatsApp requires specific format. WhatsApp phone number must be like + COUNTRY DIAL CODE PHONE NO. without any symbol (see documentation).
I'll made a research and I found where to get all ISO Country Dial codes. So, I just had to add a new field on Country / Region table to store country dial codes. It will be used to format phone nos.
So now I should be able to start coding and change my initial idea. I decide to move on and create a page where I can select to who I want to send a message (Customer, Vendor, Contact or Employee).
Once selected, I'll can navigate and find who to send the message.
When selected, all needed data is loaded so now I only need to write the message and send it!!
So, when Send button is pressed, message appears on WhatsApp Desktop and we're able to send it. No need to be a contact on our phone.
It also works if nothing selected and just type the phone no. and the message.
And that's all. Simple and useful.




Thanks for this useful Post....may I know that if we can send the text message without opening the Whatsapp?
ReplyDeleteHi,
ReplyDeleteHas anyone tried capturing customer text for product orders into business central sales order?
This was great to read
ReplyDeleteI've had a positive experience using Mod APKs because they let users explore extra features without limitations. The most important thing is choosing a reliable source to ensure safety and regular updates. One website I recommend is https://apksunday.com/
ReplyDelete, where you can find a wide selection of apps and games with useful information and updated versions. While it's always important to support official developers when possible, Mod APKs can be a convenient option for testing features and enjoying a better overall experience.
The app seems like an interesting choice for people who enjoy exploring entertainment from a single interface. I really appreciated this article because it provided useful information about Xuper TV APK instead of simply describing it briefly. I was curious about the overall layout, navigation, and variety of available content. What I liked most was the straightforward browsing experience, which makes it easier to discover something interesting without constantly searching. The application feels comfortable for casual use, and I enjoyed taking some time to explore its different sections. This article helped me understand the app much better before using it.
ReplyDeleteApp usually opens without any trouble, but the Login process suddenly became inconsistent for me. Sometimes it would load, and other times it would return to the main screen. Your article helped me realize that this behavior could provide a clue about what was happening. I started with the connection and then restarted the application. After that, I checked the installed Freecine Download version and looked at the temporary data stored on my phone. The information was very useful because I could work through the suggestions one by one. I especially liked the practical tone and the fact that the article avoids unnecessary technical language.
ReplyDelete