How to search and create a customer
This document is designed to help you understand how you can first search for existing customers in myKaarma to avoid duplicates, and then create a new customer (along with vehicles and addresses) using a given request body.
To perform these actions, you first need your credentials. If you don't already have them, head over to the Authentication and Authorization page to see how you can request credentials from us. The process of searching for existing customers and, if none are found, creating a new customer is listed below.
Parameters
Required path parameters for process :
Parameter Name | Type | Description |
---|---|---|
departmentUUID | string | Unique identifier of dealer's department |
customerUUID | string | Unique identifier of the customer |
Scope
This process requires the following authorization scopes :
Scope | Level | Description |
---|---|---|
customer.search | DealerDepartment | Authorizes client to search for customers for provided user's dealer department |
customer.update | DealerDepartment | Authorizes client to create customer for provided user's dealer department |
Process
To efficiently manage customer data and prevent duplicates in myKaarma, API partners should follow these steps:
Search for Customers :
Use the endpoint provided in the search customer documentation to search for existing customers.
Evaluate Search Results:
If the search returns an empty list, it indicates that no matching customers exist in the system. In this case, you can proceed to create a new customer using the endpoint detailed in the create customer documentation.
If the search returns a non-empty list, it suggests that there are potential matches. It is recommended to use the UUID of the best matching customer (typically the first customer in the list) to update their information. This can be done using the endpoint described in the update customer documentation.
By following this process, we ensure that customer duplicate entries are minimized in myKaarma system.
Customer Search Guidelines for API Partners
To effectively search for customers, utilize the search endpoint with the appropriate fieldsToBeSearched
parameter based on the available information:
Customer Key :
If you have the customer's DMS unique key, search using
fieldsToBeSearched
set tocustomerKey
.example :
curl -X GET "https://api.mykaarma.com/customer/v2/department/{{serviceSubscriberDealerDepartmentToken}}/customer/listMinimal?fieldsToBeSearched=customerkey&maxResults={{maxResults}}&searchTerm={{searchterm}}"
-H "accept: application/json"
-H "authorization: {{basic_auth_token}}"
Phone Number or Email :
For searching by phone number or email (including partial values), set
fieldsToBeSearched
tocommunications.commValue
.example :
curl -X GET "https://api.mykaarma.com/customer/v2/department/{{serviceSubscriberDealerDepartmentToken}}/customer/listMinimal?fieldsToBeSearched=communications.commValue&maxResults={{maxResults}}&searchTerm={{searchterm}}"
-H "accept: application/json"
-H "authorization: {{basic_auth_token}}"
Vehicle VIN :
If you have the Vehicle Identification Number (VIN), search using
fieldsToBeSearched
set tovehicles.vin
.example :
curl -X GET "https://api.mykaarma.com/customer/v2/department/{{serviceSubscriberDealerDepartmentToken}}/customer/listMinimal?fieldsToBeSearched=vehicles.vin&maxResults={{maxResults}}&searchTerm={{searchterm}}"
-H "accept: application/json"
-H "authorization: {{basic_auth_token}}"
Last Name :
To search by the customer's last name, use
fieldsToBeSearched
set tolname
.example :
curl -X GET "https://api.mykaarma.com/customer/v2/department/{{serviceSubscriberDealerDepartmentToken}}/customer/listMinimal?fieldsToBeSearched=lname&maxResults={{maxResults}}&searchTerm={{searchterm}}"
-H "accept: application/json"
-H "authorization: {{basic_auth_token}}"
First Name :
To search by the customer's first name, use
fieldsToBeSearched
set tofname
.example :
curl -X GET "https://api.mykaarma.com/customer/v2/department/{{serviceSubscriberDealerDepartmentToken}}/customer/listMinimal?fieldsToBeSearched=fname&maxResults={{maxResults}}&searchTerm={{searchterm}}"
-H "accept: application/json"
-H "authorization: {{basic_auth_token}}"First Name and Last Name :
To search by the customer's first name or last name use
fieldsToBeSearched
set tofname,lname
.example :
curl -X GET "https://api.mykaarma.com/customer/v2/department/{{serviceSubscriberDealerDepartmentToken}}/customer/listMinimal?fieldsToBeSearched=fname,lname&maxResults={{maxResults}}&searchTerm={{searchterm}}"
-H "accept: application/json"
-H "authorization: {{basic_auth_token}}"
Search Field Unknown If you do not know the field of search term then the you may not pass the
fieldsToBeSearched
parameter in the request.example :
curl -X GET "https://api.mykaarma.com/customer/v2/department/{{serviceSubscriberDealerDepartmentToken}}/customer/listMinimal?maxResults={{maxResults}}&searchTerm={{searchterm}}"
-H "accept: application/json"
-H "authorization: {{basic_auth_token}}"
NOTE If you do have a valid DMS unique customerKey, and you did not find any matching results in the search by customerKey - you should go ahead and select only the results with empty customerKey from the search response AND create a new Customer if no match is found. This is in accordance to the fact that we do not allow updating of customerKey via Customer Update endpoint.