Monday, November 13, 2006

How do XML Links work?

Like most things in life, XML Links can be made to seem very complicated, but when you think about the basics of what an XML link is trying to do it suddenly seems much simpler!

Let’s take an example, suppose I have a website selling campervans that doesn’t have XML links… what happens when someone comes to my site and wants to make a booking?

Well let’s say I have a form for customers to fill in. They fill in the boxes like their name, what campervan they want, the dates and cities, etc. When they click submit, the system running my website takes all that information and turns it into a standardised “easy for me to read” form that it emails to me.

OK, so far so good… what happens next? Well I open the email and I have to make the booking. Let’s say I want to book it online via the campervan operators B2B Agent booking site… I log on, and I take all the information from the computer generated form and put it in the right places on the B2B Agent booking site. And I click book.... What happens then? Well, behind the scenes the system powering the B2B site then takes the information I have entered and puts it into a form that it can understand, something like this:
VehRentalCore PickUpDateTime="2004-07-27T08:00:00" ReturnDateTime="2004-09-05T16:00:00"
PickUpLocation LocationCode="DRW" Darwin/PickUpLocation ReturnLocation LocationCode="CNS"Cairns/ReturnLocation ...Etc


It’s the same information I entered but in a different standardized format so that the Campervan Company’s reservations system can understand it. The reservation system then checks the vehicle is available, makes a booking and sends back a reply in its standardised language that looks a bit like this:

VehAvailCore Status="Available"…
charge" IncludedInRate="false" Amount="5535.00" Purpose="1"
Calculation UnitName="Day" Quantity="41" UnitCharge="135.00" /
/VehicleCharge
...Etc


The reply will have all of the information I need (I haven’t put the full reply in) but It is not in a very easy to read format! So the system that runs the B2B will turn it into a nice human-friendly format which I see on the screen.

I have now made the booking, but I still need to confirm this to the customer, so I take the Information I have gotten from the B2B site, and enter that into my system to generate a confirmation to the customer. Done.

OK, so where does XML come in?
What if, as soon as the customer enters in a form on my website, instead of having my system turning that into a format that I can read, it turns the same information into a format that the Reservations system of the Campervan Company can read? And then instead of sending that to me in an email, it sends it straight to the Campervan rental reservations system?
Like this: PickUpLocation LocationCode="DRW" Darwin/PickUpLocation Etc..

That shouldn’t be too much of a stretch. I just need to get my system to change the format and give it the address to send it to. But then what?

Here’s where the tricky bit is: The campervan rental site would then send back a reply, like it does to the B2B site, my system would then need to be able to understand that reply, and turn it into something that the customer on my site can make sense of. It might also need to do other things, (like add my markup for example!).

XML links are just a standard format of sending and receiving data, like a question and answer. If you can get your system to talk the write language so that it can ask questions in the right format, and understand the answers it gets you can use XML links to fully automate your bookings.

THL uses a standardised XML language called the “Open Travel Alliance” (OTA). If you think XML links are for you, you can find out more
here.

No comments:


Buzzword Timeline

Buzzword Timeline
From Wikipedia.org