Okay
  Public Ticket #3580342
webhook trigger
Closed

Comments

  • youssef started the conversation

    hey,

    please is there any way to trigger a webhook when order is created.

    thank you

  •  1,191
    Uroš replied

    Hello Youssef,

    Thank you for reaching out to us.

    Amelia currently has the following hooks:

    <script>
    window.ameliaActions = {  ViewContent: function (success = null, error = null, data) {    //triggered when the form loads    console.log('ViewContent HOOK')    console.log(data)    console.log('------------')  },  SelectService: function (success = null, error = null, data) {    //triggered when the service is selected/changed in the form    console.log('SelectService HOOK')    console.log(data)    console.log('------------')  },  SelectEmployee: function (success = null, error = null, data) {   //triggered when the employee is selected/changed in the form    console.log('SelectEmployee HOOK')    console.log(data)    console.log('------------')  },  SelectLocation: function (success = null, error = null, data) {    //triggered when the location is selected/changed in the form    console.log('SelectLocation HOOK')    console.log(data)    console.log('------------')  },  SelectCategory: function (success = null, error = null, data) {    //triggered when the category is selected/changed in the form    console.log('SelectCategory HOOK')    console.log(data)    console.log('------------')  },  SelectPackage: function (success = null, error = null, data) {    //triggered when the package is selected/changed in the form    console.log('SelectPackage HOOK')    console.log(data)    console.log('------------')  },  customValidation: function (success = null, error = null, data) {    console.log('customValidation HOOK')    console.log('------------')    console.log(data)     const customValidator = (rule, value, callback) => {      if (value.includes('SOME_REGEX')) {        callback(new Error())      } else {        callback()      }    }    // this example is for email input field    data.rules.email.push({message: 'CUSTOM MESSAGE', validator: customValidator})  },  InitiateCheckout: function (success = null, error = null, data) {    //triggered once the customer lands on the "info" page where they fill in their details    console.log('InitiateCheckout HOOK')    console.log(data)    console.log('------------')  },  Schedule: function (success = null, error = null, data) {    //triggered once the 'on-site' booking is completed    console.log('Schedule HOOK')    console.log(data)    console.log('------------')  },  Purchase: function (success = null, error = null, data) {    //triggered once an online booking is completed    console.log('Purchased HOOK')    console.log(data)    console.log('------------')  },  beforeBooking: function (success = null, error = null, data) {    //triggered when the "Confirm" button is clicked but before the booking is completed.    //This hook currently doesn't work for Mollie and WooCommerce payments    console.log('Before booking is created HOOK')    console.log(data)    console.log('------------')  },
    }
    </script>

    These are the same hooks used in Google Analytics and Facebook Pixel integrations, but if you need some other hooks added, please let us know which ones and explain what they would contain and when they should be triggered.


    Kind Regards, 

    Uros Jovanovic
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • youssef replied

    Thank you Uroš.

  •   Uroš replied privately
  • youssef replied

    Hi, done thank you 

  •   Uroš replied privately