addCruiseBooking

The addCruiseBooking method passes information from your site to Monetate when a customer purchases a cruise. This method consists of eight required attributes and seven optional attributes.

Required Attributes

These attributes are required with the addCruiseBooking method:

  • adults — An integer that includes the total number of adult passengers for the cruise
  • dtBegin — A string that includes the cruise's start date in YYYYMMDD format
  • dtEnd — A string that includes the cruise's end date in YYYYMMDD format
  • guests — An integer that includes the total number of adults and children for the cruise
  • purchaseId — A string that includes the order ID for a purchased cruise
  • pid — A string without spaces that includes an internal ID used to identify a cruise
  • quantity — An integer that includes the number of cruises booked, which is typically 1
  • unitPrice — A string that includes the cruise's price of the cruise in the format XX.XX

Optional Attributes

These attributes are optional for the addCruiseBooking method:

  • dest — A string that includes the cruise's port of destination
  • children — An integer that includes the total number of child passengers for the cruise
  • port — A string that includes the cruise's port of departure
  • rmClass — A string that includes the type of room selected for the cruise
  • rmNumber — A string or integer that includes the room number selected for the cruise
  • ship — A string that includes the name of the cruise ship
  • currency — A string in the ISO 4217 standard (three capital letters and no spaces) that includes the currency used to book the cruise

Code Sample

// addCruiseBooking Method
window.monetateQ = window.monetateQ || [];
var bookingObject = {
  // Required
  'adults': [2],
  'dtBegin': ['20160601'], // June 1, 2016
  'dtEnd': ['20160605'], // June 5, 2016
  'guests': [5],
  // Optional
  'children': [3],
  'port': ['Port Royal'],
  'dest': ['Tortuga'],
  'ship': ['The Black Pearl'],
  'rmClass': ['Captains Quarters'],
  'rmNumber': [1]
};
window.monetateQ.push(['addCruiseBooking',
  bookingObject,
  'WA123',
  'ROYAL1',
  1,
  '400.00',
  // optional
  'GBP'
]);
window.monetateQ.push(['trackData']);