Background
Problem: Different dealers use different fields to store the same information in their CDK DMS. Some dealers use custom fields to store information we need (such as Sale Type or Gross values). Previously (on the CDK API 1.0), we had no way to ingest their data through the CDK API and these dealers were forced to not use the API (and provide a manual file instead). We need the API to be more flexible for a variety of dealers.
Solution: we will offer Custom Field Mappings, Custom Exceptions, and Universal Exceptions
Benefit: More dealers will be able to use the CDK API, resulting in Clarivoy receiving their sales in a timely and accurate manner (vs. collecting a file).
Types of Custom Mappings
-
Universal Mappings
objective: for mapping CDK field → cdk_raw field for all properties
example: FIDealType [original CDK data] → new_or_used [in cdk_raw]-
Custom Mappings
objective: for mapping CDK field → cdk_raw field for specific property IDs
example: For Property 99997, CustomFrontGrossFieldName [original CDK data] → front_gross [in cdk_raw]
-
Universal Value Exceptions
objective: for inserting hardcoded values → cdk_raw field based on a condition met in the original CDK data
example: IF FIDealType = Wholesale [original CDK data], THEN set [in cdk_raw] sale_type=Wholesale-
CDK_API_VALUE field should accept wildcard character of * (asterisk) anywhere in the string. *=any number of characters.
Examples:- WHOLESALE* would mean “starts with WHOLESALE”
- *WHOLESALE would mean “ends with WHOLESALE”
- *WHOLESALE* would mean “contains WHOLESALE”
- M*SALE would match values such as “MISC SALE” “MISCELLANEOUS SALE” “M SALE”
-
NULL values - CDK_API_VALUE field should accept values of <NULL>|<null>|null|NULL all equating to null
-
CDK_API_VALUE field should accept wildcard character of * (asterisk) anywhere in the string. *=any number of characters.
-
Custom Value Exceptions
objective: for inserting hardcoded values → cdk_raw field based on a condition met in the original CDK data - for specific property IDs
example: For Property 99998, IF DealType = 3 [original CDK data], THEN set [in cdk_raw] sale_type=Wholesale-
CDK_API_VALUE field should accept wildcard character of * (asterisk) anywhere in the string. *=any number of characters.
Examples:- WHOLESALE* would mean “starts with WHOLESALE”
- *WHOLESALE would mean “ends with WHOLESALE”
- *WHOLESALE* would mean “contains WHOLESALE”
- M*SALE would match values such as “MISC SALE” “MISCELLANEOUS SALE” “M SALE”
-
NULL values - CDK_API_VALUE field should accept values of <NULL>|<null>|null|NULL all equating to null
-
CDK_API_VALUE field should accept wildcard character of * (asterisk) anywhere in the string. *=any number of characters.
-
Universal Field Exceptions
objective: for mapping specific original CDK field values → cdk_raw fields based on a condition met in the original CDK data
example: IF FrontEndGrossProfit = <null> [original CDK data], THEN map FrontGross [original cdk field] → front_gross [cdk_raw]-
CONDITION_VALUE field should accept wildcard character of * (asterisk) anywhere in the string. *=any number of characters.
Examples:- WHOLESALE* would mean “starts with WHOLESALE”
- *WHOLESALE would mean “ends with WHOLESALE”
- *WHOLESALE* would mean “contains WHOLESALE”
- M*SALE would match values such as “MISC SALE” “MISCELLANEOUS SALE” “M SALE”
-
CUSTOM_VALUE field will accept <NULL>|<null>|null|NULL
-
CONDITION_VALUE field should accept wildcard character of * (asterisk) anywhere in the string. *=any number of characters.
-
Custom Field Exceptions
objective: for mapping specific original CDK field values → cdk_raw fields based on a condition met in the original CDK data - for specific property IDs
example: For Property 99998, IF AccountingDate = <null> [original CDK data], THEN map ContractDate [original cdk field] → sales_date [cdk_raw]-
CONDITION_VALUE field should accept wildcard character of * (asterisk) anywhere in the string. *=any number of characters.
Examples:- WHOLESALE* would mean “starts with WHOLESALE”
- *WHOLESALE would mean “ends with WHOLESALE”
- *WHOLESALE* would mean “contains WHOLESALE”
- M*SALE would match values such as “MISC SALE” “MISCELLANEOUS SALE” “M SALE”
-
CONDITION_VALUE field should accept wildcard character of * (asterisk) anywhere in the string. *=any number of characters.
-
Custom Mappings
CUSTOM_VALUE field will accept <NULL>|<null>|null|NULL
Custom Mapping Process
This explains how to add custom mapping for specific fields or custom value exceptions - for a specific property.
- Determine the fields you want to map. Fields are case sensitive and must be in this format:
object.attribute- Check Sales Dashboard.
- Query by Property ID.
- In the CDK Raw tile, export the data to Excel.
- All fields sent by the API are in the Original JSON column. Some of the common fields have been added to this table as columns of their own for easy reference.
- If needed, see list of available fields from the API here: Field Mapping: CDK Drive Get FI Sales API
- Check Sales Dashboard.
- Open the Google Sheet CDK Mappings.
- Add row(s) to one of the following sheets:
- Custom Mappings
- Custom Value Exceptions
- Custom Field Exceptions
Do not modify the Universal Mappings or Exceptions sheets without first consulting Ops Director as this will affect ALL dealers on the CDK API. The downstream impact of any changes needs to be considered/studied before modifying mappings or exceptions for all dealers.