I need to pass in a CRM ID# and retrieve it later. What hooks should I use?

So here's the deal... We're using Appointments+ for internal usage only. We use Highrise CRM. I am comfortable with their API and have written a couple other scripts to integrate it with other tools we use.

I want to pass in the Highrise ID via a GET variable. Once an appointment is made I want my plugin to retrieve that ID along with all of the field data collected by Appointments Plus. At that point my plugin will shove all the information into Highrise.

I'm digging through the code. It looks like my best bet would be "wp_ajax_post_confirmation"?

Also, my plan was to shove the Highrise ID into an additional field. That means my plugin needs to catch the appointment scheduling page as it's being generated. What hook should I use for that?

Once I figure out what hooks to use I'll be fine. It would be really cool if you folks would create some documentation regarding those hooks...

  • Ash
    • WordPress Hacker

    Hello @Matthew

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    I think he developer @Vladislav is the best person to give you some suggestion. Let me bring him in this thread.

    Note that, developer response a bit slower than normal response time as he might be busy with some other important stuffs too.


  • Vladislav
    • Dead Eye Dev


    That hook could be the proper one - but, it's also an AJAX hook, so you'll want to make sure you're passing in your variable from GET, which usually involves intercepting the call with jQuery.ajaxSend. If you intend to work with the additional fields add-on, the field value will be packed in the AJAX request automatically, but you'll still want to pre-populate the field with the GET variable value. There's a bit of code that might help with that in this post: https://premium.wpmudev.org/forums/topic/can-customers-schedule-two-services-at-once#post-596811 - it does something quite different, but it also can be used as a good starting point in assigning the value to your additional field.

    Another option might be to go with the "app_new_appointment" action hook. It'll be triggered on appointment creation, and the newly created appointment ID will be passed as an argument.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.