This manual is being depreciated. Much of the information here is out of date.

The new Jomres Documentation, updated in 2022, can be found at Jomres.net/documentation.

Edit External Notification

Introduction

The purpose behind this plugin is to allow you to automatically update a remote site when a booking is taken. You can configure here the method that the system uses to send the information, which variables to send and what name you need to use for each of these variables, and finally the url of the remote site.

The External Notification plugin adds two new buttons to the Administrator's control panel :

External notification profiles
External notification Transactions

External notification profiles

The button allows you to create notification profiles. A profile is a series of settings that you can configure to tell the system where and what to pass booking information to.

Clicking on this button will give you a list of any existing profiles. If you click the New button to create a new Profiles.

On the New/Edit profile page you will see a number of inputs :

Profile title     
Method     
Url     
Script
Our variable names     
Outgoing variable names

Profile title

Give this a title that's meaningful to yourself.

Method

You may choose either GET or POST methods. If you want to add a new method to this dropdown you will need to edit j16000edit_external_notification.class.php to add it to the dropdown and create a new class file to handle the sending of the data. For example, to send POST information, we use a file called xn_post.class.php.

Url

This is the address of the remote host. You can use either a fully qualified domain name like www.domain.com or an IP number. Do not add a trailing slash.

Script

Typically index.php, but you might need to set something else. you can put either just the name of the script, like 'index.php' or you can add further information like 'index.php?foo=bar

Our variable names

Enter the Jomres variable names here.

You may use multiple variables, seperating them with a , (comma). If you do have multiple variables, you need to ensure that the outgoing variable names are in the same order and have the same number of variable names.

In the short term you'll need to view the componentArgs as they're defined in j03020insertbooking.class.php for variable names, in time they will be documented here.

You can send custom variables and values by setting a 'Our variable names' name to 'xn_something', e.g. 'xn_password' and the corresponding variable in the 'Outgoing variable names' field to 'mysecret' where mysecret is your password. The External notification plugin will treat these variables as data to be passed as if it came from Jomres. For example, a get string would include &password=mysecret.

To give you an example, our test variable names look like : cartnumber,arrivalDate,departureDate,contract_total,xn_customvariable

Outgoing variable names

You need to define the outgoing variable name. Eg, our variable name might be <i>cartnumber</i> whereas you might need to transpose the variable name to, for example, <i>bookingnumber</i>. You will need to refer to the remote server's documentation.

Our corresponding test variables for this field are : booking_number,arrival,departure,grand_total,mysecret


External notification Transactions

This button lists all of the notification transactions

It will list the data we sent, and any replies that were echoed by the remote server.