Okay
  Public Ticket #2701430
More control on the scheduled email notification feature
Closed

Comments

  •  1
    Eshley Nau started the conversation

    Hi, 

    I have been trying to setup the scheduled email notification feature into one of my client's website. As you know, Amelia only allows you to schedule the email reminder up to one day prior to that appointment time. The thing is, my client wants his reminder email to be sent exactly 3 hours prior his customer's appointment time. So far, I have been trying to set it up using cron jobs but I could find a way to achieve what I really needed. Do you guys have an idea of how I could achieve or if there is a turn around  that could achieve that 3 hour prior notification setting please? 

    Thank you in advance!

  • [deleted] replied

    Hi Eshley,

    thank you for the kind inquiry.

    There isn't a possibility of sending reminder notification 3 hours before an appointment with Amelia's current built-in features, unfortunately. 

    There is only one reminder notification option in the Amelia notification emails and it is sent one day before the appointment at the scheduled time. It isn't possible to change this notification sending time, unfortunately.

    If you have any other questions or concerns feel free to open a new ticket and we will gladly help out.


  •  1
    Eshley Nau replied

    Hi,

    Okay there is no way to achieve it even with some kind of hook combine with an email automation plugin/software like mail chimp? Also, I have been trying to set it up but my customers don't even received their reminder. And make sure to add the new cron job into my server cPanel. So I just can't figure out whats not working... please could you help me with this?

    Thank you.

  • [deleted] replied

    Hi Eshley,

    thank you for the kind reply.

    Yes, we have webhooks, but using them requires some knowledge about webhooks and is not included in the support for provided plugin.

    Here is an example of how Mailchimp can be used:

    Anything beyond this requires more customization and webhook managing, which we do not provide.

    We are planning to add customizable reminder notification in the future, but we don't have an ETA for that implementation.

  •  1
    Eshley Nau replied

    Hi okay thanks for the video I will take a look at it surely! In the mean time, could you guys try to take a look on my website and see if setup the reminder notification the right way? Because I have trying to set it up for the past 2 weeks and even if I followed the guide on how to set it up on your website's docs, clients are telling us that they do not receive their notifications... Let me know what credential you need and I will give it to you... thanks!

  • [deleted] replied

    Hi Eshley,

    thank you for the kind reply!

    Yes, please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. 

    You can write credentials here just check Private Reply so nobody can see them except us.

  •   Eshley Nau replied privately
  • [deleted] replied

    Hi Eshley,

    thank you for the kind reply.

    I see that you have set it up on the server, however, there is no visible error.

    I do have instructions that could help you:

    Cron is a Linux utility which schedules a command or script on your server to run automatically at a specified time and date. A cron job is the scheduled task itself. Cron jobs can be very useful to automate repetitive tasks like in our plugin for notifications.

    Depending on the server, there are different configurations for it, which you can contact your hosting provider about, or you can check out one of the solutions for it on this link.

    Also, you can try this:

    */15 * * * * wget -q -O - "https://www.yourwebsite.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/notifications/scheduled/send"

    Or this:

    */15 * * * * /usr/local/bin/php ~/public_html/wp-cron.php --action='wpamelia_api' --call='/notifications/scheduled/send'

    Or this:

    GET 'https://yourdomain.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/notifications/scheduled/send' > /dev/null

    WP Crontrol plugin is the best option if you're not familiar with cron jobx. You can find more info about it, and detailed instructions on how to set it up in our FAQ section.

    So, if you already read that, and still need some clarification here's some further info.

    You copy only the URL from below a scheduled notification:

    7810032183.png

    Then, in Crontrol go to "Cron Schedules", and scroll all the way down. Add a 15 minute interval:

    7697288025.png

    Then go to "Add PHP Cron Event" and add the URL you've copied like this:

    8523604308.png

    So:

    file_get_contents("yourURL");

    Below it add the name, and set it to run a few minutes in the future, using the provided time format. So, if you're adding the cron event at 12:45, set it to run at 12:50; and then select the schedule you previously selected:

    7642938415.png

    Click on Add Event, and that's it.

    The cron runs every 15 minutes, and checks if there's an email to be sent. So, in Amelia Notifications, your scheduled notifications are set to run every day at a certain time. If you set that time to be 15:00 (for example), the emails will be sent when the cron runs after that time.

    For example, there's an appointment booked for tomorrow, and it's currently 14:44 - the cron runs, but since it's not yet 15:00, it doesn't send anything. It runs again after 15 minutes, so at 14:59, but there are still no emails flagged by Amelia, so it doesn't send anything. Then it runs again at 15:14 and it sees there's an email that should've been sent at 15:00, so it sends the email. It will only send emails when Amelia sees an appointment scheduled for the next day.

    I hope that helps.