Wappy's WhatsApp widget on certain days on your website

4 min read

A while ago, we received the question of whether it is possible to set up absence messages or indicate absence in Wappy. We have tried to provide as comprehensive an answer as possible. So read on quickly!

Indicating opening hours in WhatsApp Business

Earlier we discussed the benefits of WhatsApp Business and why it works so well with Wappy's WhatsApp widget. One of the advantages is that you can specify your opening hours within WhatsApp Business. This means that customers can message you at any time and then see when they can expect a response!

You set your opening hours as follows

Go to your settings in WhatsApp Business at the top right. Click on the option 'business tools' and then on 'business profile'. Here you can see all the information you can provide to your WhatsApp users about your business. To add your opening hours, click on the pencil icon at the top right. Set your opening hours and you're done!

Set up automatic message WhatsApp Business

Within WhatsApp Business, it is also possible to set up automatic messages. There are various message settings available, but the two options that are interesting in case of absence are as follows:

  • Out of Office Message: This message is an automatic, customizable response for when you are unavailable. You can set when the message should be sent: always, customized, or outside of business hours;
  • Greeting: This message is an automatic response that is sent after users contact you for the first time (or after 14 days of inactivity). This message is also fully customizable;

You set up your messages like this

Go to settings and then to business settings. Here you click on out-of-office message or greeting. Here you can personalize your message!

Automatic replies

Attendance and absence via Google Tag Manager


Lastly, there is the option to set days (and hours) via Google Tag Manager when the widget appears on your website. Although this removes the advantage of Wappy that you are reachable at all times, it does mean that, when you can only respond on certain days, potential customers receive a response sooner. We advise against this, but we want to give you the option. For example, for a period with several holidays on Mondays! This is a technical option, so it might be easier to have your web developer take a look at it.

Step 1. Go to GTM

Go to 'variables' within Tag Manager. Create a new 'user-defined variable' here.

New variable GTM

 

Search for 'javascript' using the search function and select 'custom javascript macro'. Here you paste the following code and save it:

 

function () { var timezone = 'Europe/Amsterdam' var localTime = new Date(); var time = new Date(localTime.toLocaleString('en-US', {timeZone: timezone})); var daysOfWeek = new Array(7); daysOfWeek[0]= "Sunday"; daysOfWeek[1] = "Monday"; daysOfWeek[2] = "Tuesday"; daysOfWeek[3] = "Wednesday"; daysOfWeek[4] = "Thursday"; daysOfWeek[5] = "Friday"; daysOfWeek[6] = "Saturday"; return daysOfWeek[time.getDay()]; }

 

Variable configuration

 


 

Step 2. Go to Triggers

Now go to triggers and create a new trigger of the type 'page view'. Name it 'If day of the week ... is'. We have chosen Monday or Tuesday here, but of course, you choose the days that you want the widget to be displayed on your website.

 

Set the trigger to be activated for 'some page views' and fill in the fields. In the first field, select the variable you just created, namely 'day of the week'. In the second field, choose 'matches RegEx' and in the third field, enter the days on which the widget should be displayed on your website (note, case sensitive). Separate the days with a vertical bar (pipe: | ).

Step 3. Go to Tags

Go to the tags tab. Here you have two options, depending on whether you have already created a tag for Wappy. Do you already have a tag? Then click on it and adjust the activating trigger to the trigger you just created: if the day of the week is Mon/Tue.

 

Do you not have a tag yet? Then create a new tag and choose the type 'custom html'. In this blog you can read more about it. Here you paste your Wappy implementation code and choose the trigger you just created.

 

You can now save.

Trigger GTM

Step 4. Sending

Click on send. Here you give your changes a version name and describe what you just did. Now you can publish.

Send tag

Ready!

Curious about other ways to personalize your widget? Then read this blog.

Want to know more about Wappy and your next step? Then read more about Wappy premium.

End of this Wappy article🤓