Okay
  Public Ticket #2099585
Integration with 3rd party CMS
Closed

Comments

  •  1
    Miguel Suarez started the conversation

    Hello, We have a client that uses Amelia Booking plugin, and we have developed a WordPress plugin that sends submitted info to a CRM, we would like to know how can we integrate this plugin with ours.

    We have been able to integrate other plugins successfully because they all use WP action hooks, but Amelia doesn't seem to use them. 

    How can we trigger the sending of the booked info to the CRM?

  • [deleted] replied

    Hi Miguel,

    Thank you for your interest in our plugin.

    Unfortunately we don't have hooks (action and filters) at the moment. What we have is a few JS hooks that are triggered depending on the view:

    window.beforeAddToCalendarLoaded()
    window.beforeBookingLoaded()
    window.beforeSearchLoaded()
    window.beforeSearchFiltered()
    window.afterSearchFiltered()
    window.beforeConfirmedBooking()
    window.beforeCatalogLoaded()
    window.afterSelectCatalogCategory(object_category)
    window.beforeCatalogCategoryLoaded(object_category)
    window.beforeCatalogServiceLoaded(object_category, object_service)
    window.afterSearchActivateService(object_appointment, object_serviceActive)
    window.afterSearchGoToSecondStep(object_appointment, object_serviceActive)
    window.afterBookingSelectDateAndTime(object_appointment, object_serviceId, object_providerId, object_locationId)
    window.afterBookingSelectService(object_appointment, object_serviceId, object_providerId, object_locationId)
    window.beforeConfirmBookingLoaded(object_appointment, object_service, object_provider, object_location)
    window.afterConfirmBooking(object_appointment, object_service, object_provider, object_location)

    These are hooks that you can use to follow each step of the booking process. These hooks are ordered by the time of execution. Some of these functions accepts parameters that you can see in the parentheses, so you can send the data to your custom endpoint.

    This is the example how you can use one of the hooks (just put it directly on your page):

    <script>
    window.afterConfirmBooking = function(appointment, service, provider, location) {   
     // Send data to your custom endpoint
    };
    </script>

    Best regards.


  •  1
    Miguel Suarez replied

    Thanks! We will check this out.