This is just an example of how you could implement a usecase like this. We don’t provide support on the example, it just something to get you started.
Goal is to have salesforce select recepients, then send those recepients a templated whatsapp message (via tyntec)
High level steps:
General idea is to create templates in Tyntec
Add those templates to Social25 as well.
Create a screenflow to create a conversation and then send a message in that conversation.
You can setup the flow in such a way to you can for example send multiple contacts (or something else) the same templated message. This is not a mass message solution, but meant for larger groups of recipients, 20 or 30 at the same time for example.
How to:
Create tyntec templates and get them approved
Check out Tyntec documentation on this
Create Social25 templates
Go to templates and add a new template with the same name as in tyntec.
{ "components": [ { "parameters": [], "type": "body" } ], "locale": "en", "name": "standard_message", "namespace": "<namepsaceUUID>", "text": "Unfortunately, we were unable to respond to your message earlier. That is why we can now only send you this standard message. We can pick up our conversation where we left of once you reply to this message, so feel free to reach out!" }
Where locale is the language of the template and name is the name of the template in tyntec
Namespace can be found in the same platform object as the platform id in the Social_Data__c field.
the text should match the text configured in tyntec and if you have merge fields add them in the parameters array like this
{ "components": [ { "parameters": [ { "text": "{{1}}", "type": "text" } ], "type": "body" } ], "locale": "en", "name": "personalized_message", "namespace": "<namepsaceUUID>", "text": "Unfortunately {{1}}, we were unable to respond to your message earlier. That is why we can now only send you this standard message. We can pick up our conversation where we left of once you reply to this message, so feel free to reach out!" }
Create a flow
The screenflow is responsible to select the recepients, create a conversation and post a template message.
Select recipients
Get contacts/any sObject with a phone number
Allow user to select the ones they want to send the message to.
Create conversation
Loop over the contacts and call Social25__Post_Conversation for each. using the platform id in the platform object in the Social25__Heroku_Id__c field.
Store the conversation id returned in a list.
Create message with templates
Loop over all the conversation ids and call the
Social25__Post_Template_Message action with:
async true
the conversation id
the record id of the matching contact. only important if you have merge fields.
Name of a social25__Template__c object