Link Search Menu Expand Document

In Path Property Descriptions

Properties
  1. addPromotionCode(promotionCodeType: CTPromotionCodeType)
  2. accountId
  3. clientId
  4. clientUserIdentifier
  5. country
  6. currency
  7. darkModeConfig
  8. dropOffDateTime(dropOffDateTime: LocalDateTime)
  9. dropOffLocationIATA
  10. dropOffLocationId
  11. enableCustomCashTreatment
  12. enableSupplierBenefitAutoApplyCodes
  13. flightNumberRequired
  14. logging
  15. loyaltyRegex
  16. orderId
  17. passenger
  18. pickupDateTime
  19. pickupLocationIATA
  20. pickupLocationId
  21. theme
  22. uspDisplayType
  23. visitorId
  24. withSettingsMenuIconType(settingsMenuIcon: CTSettingsMenuIcon)

CTSdkData Builder

addPromotionCode(promotionCodeType: CTPromotionCodeType)

This allows Partners to pass a promotion code type to the SDK as the main toggle to display promotion code field on the search form or not. The following types can be used:

/**
 * This will display an input field that will allow the user to input/paste a promotion code that will be sent to Availability Request.
 */
CTPromotionCodeType.UseInAppInputType

/**
 * This means that a hardcoded promotion code will be injected by the partner in the
 * SDK initialization and also a field will be displayed to the user that can change the
 * code
 */
CTPromotionCodeType.WithCodeType(promotionCode: String)

Note

If addPromotionCode method is not called with any of the options described above the promotion code field will not be shown in the search form screen.


accountId

A string value that represents the Account ID.


clientId

A string identifier provided by CarTrawler required to use the CarTrawler API.


clientUserIdentifier

A string token of a logged in user that allows the SDK to fetch the user loyalty details and points.


country

An optional two letter country code string, based on the ISO standard e.g “US”, “IE” used on the CarTrawler API. The country code associated with the device’s system region is used by default.


currency

An optional currency code string, based on the ISO standard currency codes e.g “USD”. The currency associated with the device’s system region is used by default.


darkModeConfig

An optional int that can be passed to the SDK to control whether or not Dark Mode should be used, for more details check Dark Mode. The following options can be used:

AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
AppCompatDelegate.MODE_NIGHT_YES
AppCompatDelegate.MODE_NIGHT_NO

dropOffDateTime(dropOffDateTime: LocalDateTime)

An optional LocalDateTime that indicates the rental drop off date.

Note

If this is not called the drop off date will be set to the same value set in the pickupDateTime + 3 days


dropOffLocationIATA

A string IATA code for drop off location, e.g “DUB” for Dublin.


dropOffLocationId

A string OTA Location ID for drop off location, e.g “11” for Dublin.


enableCustomCashTreatment

Call this method to display enhanced cash voucher merchandising throughout the booking flow.


enableSupplierBenefitAutoApplyCodes

A boolean that allows Partners to initialise the SDK and opt in to apply ALL automatic codes that can be applied for suppliers.


flightNumberRequired

A boolean key to enable Flight Number as a required field in the Payment Form. Flight number required is enabled by default.


logging

A boolean value for additional logging while debugging.


loyaltyRegex

A string regex that if passed will be used to validate the loyalty membership id in the payment form.


orderId

A string value that represents the Order ID for a Flight PNR or Booking Reference, Example: IE1234 (limited to 32 characters)


passenger

An optional CTSdkPassenger, passing this will pre-populate the driver details form during the booking flow.

The CTSdkPassenger object has the following optional parameters:

ParameterDescriptionUsageType
firstNameCustomer’s nameFirst name displayed on the driver details screenString
lastNameCustomer’s last nameLast name displayed on the driver details screenString
emailCustomer’s emailEmail displayed on the driver details screenString
phoneCountryCodeCustomer’s 3 digit phone country codePhone code displayed on the driver details screen. If not set, it is retrieved from user’s country codeString
phoneNumberCustomer’s phone number in national formatPhone number displayed on the driver details screenString
addressCustomer’s AddressAddress displayed on the driver details screenString
cityCustomer’s cityCity displayed on the driver details screenString
postcodeCustomer’s postcodePostcode displayed on the driver details screenString
countryCustomer’s countryCountry displayed on the driver details screen. If not set, it fallbacks to the country set in the main CTSdkData or the device’s countryString
flightNumberCustomer’s flight numberFlight number displayed on the driver details screenString
ageCustomer’s ageAge displayed on the driver details screenString
membershipIdCustomer’s loyalty program idLoyalty number displayed on the driver details screen and also used to retrieve loyalty points to be displayed during the booking flowString
//Example CTSdkPassenger initialisation
val passenger = CTSdkPassenger.Builder()
        .firstName("John")
        .lastName("Murphy")
        .email("mail@mail.com")
        .phoneCountryCallingCode("353")
        .phoneNumber("08666666666")
        .address("Pearse Stree 738")
        .city("Cork")
        .postCode("W99NH99")
        .country("IE")
        .flightNumber("IE 123")
        .age("29")
        .membershipId("123456")
        .build()

//Use CTSdkPassenger when initialising CTSdkBuilder
val sdkData = CTSdkData.Builder(clientId = clientId).passenger(passenger).build()

pickupDateTime

A required LocalDateTime that indicates the rental pickup date.


pickupLocationIATA

A string IATA code for pickup location, e.g “DUB” for Dublin.


pickupLocationId

A string OTA Location ID for pickup location, e.g “11” for Dublin.

Note

This is required if pickupLocationIATA is not set.


theme

An @StyleRes int that is used to setup the theme for the SDK, for more details check Themes.


uspDisplayType

This allows Partners to choose which homepage USP style they want to use in the app. The following types can be used:

CTUSPDisplayType.DEFAULT_STYLE
CTUSPDisplayType.CHECK_STYlE

Note

If you don’t call this method CTUSPDisplayType.DEFAULT_STYLE will be used.


visitorId

An optional String value that represents the Visitor ID.


withSettingsMenuIconType(settingsMenuIcon: CTSettingsMenuIcon)

Used to set the menu icon on the toolbar on the landing and search screens, for more details check Settings. The following types can be used:

CTSettingsMenuIcon.COG
CTSettingsMenuIcon.HAMBURGER
CTSettingsMenuIcon.USER

Adding Flight Information

For enhanced reporting partners can optionally add flight data when initialising the SDK. Each of these parameters is optional and user functionality will not be impacted whether they are added or not.

A new CTFlightDetails object is added with the following parameters.

ParameterDescriptionExampleType
ageCustomer age29Integer
bagsTotal number of bags. Both Cabin and Hold should be included3Integer
basketAmountTotal basket amount including bags, seats, etc.130.99Float
campaignIDUnique identifier associated with a specific marketing campaign.Google-EN-Destination-FranceString
contextWhere in the flow the SDK is loadedConfirmation ScreenString
fareClassType of fareEconomyString
flightFarePrice of flight(s) only101.99Float
loyaltyNumberCustomer loyalty number123222121String
loyaltyTierCustomer loyalty tierPlatinumString
marketingPreferenceFlag to indicate if the current user has opted in for third-party marketing i.e car rentaltrueBoolean
marketingSegmentThe customers segment as determined by the airline marketing team.Weekend BreakerString
membershipIDOnly required if different from loyaltyNumber. This value represents the logged in users unique identifier.789String
passengerBreakdownBreakdown of Adults, Teens, Children and InfantsCTFlightPassengerBreakdown(adults: 2, teens: 0, children: 0, infants: 0)CT Object
pnrFlight PNRCT123456String
sessionIDCurrent user session identifier0idfw78jsnkooString
sportsEquipmentTotal number of sports equipment items a customer is travelling with1Integer
sportsEquipmentBreakdownA breakdown of the individual equipment a customer is travelling with[“golf”: (1), “ski”: (1), “surf”: (1)]Map
tripDurationTotal length of trip in days4Integer
tripTypeAn identification of whether the trip type is business, leisure, or otherBusinessString
//Example CTFLightDetails initialisation
val flightDetails = CTFlightDetails.Builder()
        .age(32)
        .bags(3)
        .basketAmount(99.90)
        .campaignID("Google-EN-Destination-Ireland")
        .context("confirmation")
        .fareClass("regular")
        .flightFare(101.99)
        .loyaltyNumber("12345")
        .loyaltyTier("Platinum")
        .marketingPreference(true)
        .marketingSegment("Budget Traveller")
        .membershipID("12343")
        .passengerBreakdown(CTFlightPassengerBreakdown(adults = 2, teens = 1, children = 1, infants=1))
        .pnr("12345")
        .sessionID("0idfw78jsnkoo")
        .sportsEquipment(3)
        .sportsEquipmentBreakdown(mapOf("Golf" to 1, "Ski" to 1, "Surf" to 1))
        .tripDuration(2)
        .tripType("leisure")
        .build()

//Use CTFlightDetails when initialising CTSdkBuilder
val sdkData = CTSdkData.Builder(clientId = clientId).flightDetails(flightDetails).build()

Adding UTM tracking data

For enhanced reporting partners can optionally add tracking data in the form of UTM parameters. The meaning and usage of these parameters are as standard.

A new CTUTMParameters object is added with the following parameters.

//Example CTUTMParameters usage
val utmParameters = CTUTMParameters(
    .utmSource = "partner_utm_source"
    .utmMedium = "partner_utm_medium"
    .utmCampaign = "partner_utm_campaign"
    .utmTerm = "partner_utm_term"
    .utmContent = "partner_utm_content"

//Use CTUTMParameters when initialising CTSdkBuilder
val sdkData = CTSdkData.Builder(clientId = clientId).utmParameters(utmParameters).build()