Skip to main content

I am looking to setup on Front to allow agents to view conversations happening in WhatsApp Business accounts that I manage as well as handle quick questions with my API so that agents do not need to handle those types of questions. 

I have already added the channel but am confused as to how to send messages to users via Front or if I should be sending messages via the Twilio SDK and Front will just sync with Twilio through the channel. Usually platforms like Front have a webhook that I have to plugin to my WhatsApp sender in twilio but that documentation/requirement does not seem to be present for Front?

 

Hi,

Assuming you have Set up a Twilio WhatsApp inbox in Front and followed all the listed steps in that article, all the WhatsApp sender config should be taken care of. 

You can pick either option; 

To send outbound Twilio WhatsApp messages via Front’s API, use the various Messages API endpoints.

If you prefer to send the messages directly via Twilio, note the outbounds will not appear in Front until an inbound reply is received as a response to that outbound message (see docs). 


Is this document up to date?

https://help.front.com/en/articles/245248

And if so how do I get those front Webhooks that I need to put in my Twilio WhatsApp Sender?


Yes - it’s up to date. This section explains where to find the webhook. 
It’s a fairly involved process, so we strongly recommend taking it step-by-step and ensuring you have completed every step.


Yeah, I didn’t realize the webhook would show up in Twilio. Thanks, was able to sort that out.

Couple more questions:

1.  Does Front support WhatsApp message templates for Twilio WhatsApp channel? If not, is the expectation just for me to match the text that I have set up as the template and send it through Front?

  1. How does Front handle image / video attachments via webhook events? Do I have to auth in to get the image url? Or does front not provide the twilio hosted image url?
    I see this: "body": "<div>hello 4</div><div><img class=\"front-inline-img\" src=\"/cell-00027/api/1/companies/fa0d642bf553186ce4ea/attachments/4ddeae8e94770e77fe77bff9810b7444fd79f494?resource_link_id=350160165531\"></div>" and https://gently.api.frontapp.com/download/fil_4gv0bkwr in the webhook event but not a image url in the webhook attachment? Additionally, following the docs for Download Attachments doesn’t work and results in auth errors (unless the bearer token is different from both the oath client secret and the app secret?)

Message Templates

You just need to ensure the text you send exactly matches the structure of your approved message templates.

 

Attachments via Webhook

Check out the API docs for downloading an attachment. You’ll just need to authenticate the request to the URL you provided with a Front API token or Front OAuth access token.

 

Take a look at our guide on API Authentication (covers both OAuth and API token access) for full details. 


Got it, thanks. 

 

Is there a recommended flow for what else I should hit via the API prior to messaging a user for the first time on Front? (i.e. creating a contact first, etc) Since I am using Twilio WhatsApp and users are opting into being messaged I already have their numbers and details. 


Hi there!
If you have auto-create contacts turned on, then these contacts will automatically be created in Front. If not, then you can use our contacts API to update or create new contacts as you’d like before messaging these users.

 

Hope this helps!


Message Templates

You just need to ensure the text you send exactly matches the structure of your approved message templates.

 

Attachments via Webhook

Check out the API docs for downloading an attachment. You’ll just need to authenticate the request to the URL you provided with a Front API token or Front OAuth access token.

 

Take a look at our guide on API Authentication (covers both OAuth and API token access) for full details. 

 

Hello, 

I’m having issues while sending Approved WhatsApp Message Templates using this Channel.

 

In Front I’m seeing the following: (63016)

 

Error Message in Front
 


In Twilio Logs i see the following error:

63016 Failed to send freeform message because you are outside the allowed window. If you are using WhatsApp, please use a Message Template. 


I believe Twilio’s Content Builder is not supported, so I created this message template in Meta’s WhatsApp Manager. It’s Approved and Active and the text matches exactly the message I’m sending. 

 

 

Approved Template
​​​​

Do you have any suggestions?


@lmdl05 I’d advise reaching out to our support team and sharing the Front message ID of the example that failed - we will be able to investigate the details of that specific case with you


Reply