WEBSITE INTEGRATIONS
Inquiry Import
8 min
target audience the target audience of this document are developers or persons with at least some software development experience general instead of offering a form as a widget we decided to hook into any existing forms on the website this gives your web agency full control over the design and the functionality of the form while we do fully operate in the background please be aware that our script does only support one form per page this is a safe guard so that multiple initializations, which can happen on a spa (single page application) do not trigger multiple form imports integration we have two ways for integrating with your form one is to add the required mapping information to your inputs with data attributes or the other one is to include the mapping within a script tag samples data attributes lastname 	 email 	 message 	 script tag when using the script tag please make sure that it is placed after the form tag otherwise form will not be available when the inquiry script is initialized and the initialization will therefore fail firstname 	 lastname 	 phone 	 email 	 documentation required fields if at least a valid email address and a first or last name was supplied, the inquiry will be imported into the hotel software javascript options name description default value preventdefault if set to true, prevents the default action of the submit button true autobindsubmitevent automatically bind itself to the submit event of the form if false please call hotelsoftware inquiry processsubmit(submitevent) manually true onsuccess method called when the inquiry was imported successfully function () { } onerror method called when the inquiry import failed function (status) { } env environment (only required for testing purposes) 'prod' hotelid '' lang will be transmitted to the hotel software as the web page langauge and will be set as the guests default communication language ( iso 639 1 2 letter language code) 'de' dateformat should be set to whatever date format is used in the date input fields required for the hotel software to parse the supplied dates 'dd mm yyyy' formid 'hm booking request form' formselector if set the form will be looked up using document queryselector and then the formid will be set as the forms id attribute value if null we will try to find a form with the supplied formid null injectattributes false eventcategory we will trigger a google analytics event with the event action set to inquiry the value of eventcategory will be used as the category defaults to our brand if you are using a white label version of our hotel software you should overwrite this value with your own brand name attributemap input mapping to hotel software inquiry fields (in case you do not use the data attributes) \[] supported fields field name description arrivaldate arrival date defined in dateformat departuredate departure date defined in dateformat guest nameprefix title prefixing the guests name (e g dr , prof , ing ) guest firstname either first or last name is required guest lastname either first or last name is required guest namesuffix title suffixing the guest name (e g ba, msc) guest phonenumber phone number (preferably in the e 123 format) guest emailaddress required guest address can be any single or multi line string containing the street and the house number (lines should be separated using the new line character) guest zipcode guest city guest countrycode iso 3166 1 alpha 2 country code message can be any single or multi line string (lines should be separated using the new line character) inquiry\[0] roomtypename room type name (preferably matches the room type name in the hotel software, otherwise we will try to do a smart matching) inquiry\[0] rateplanname rate plan name (preferably matches the rate plan name in the hotel software, otherwise we will try to do a smart matching) inquiry\[0] roomcount if not supplied (or 0) defaults to 1 inquiry\[0] numadults maximum value 30 inquiry\[0] numchildren maximum value 10 inquiry\[0] childages ideally a comma separated list of ages we do use ai (artifical intelligence) technologies to match room type and rate plan names and to extract the age of each child