Upload Customers Profile

Overview - Step 3 of 4 Upload Steps

Unlock the LogSales functions this function is used to "refresh" the ENTIRE customer database for this particular location.  By following the directions in the GettinStartedGuide this will API will allow you to flush out the old customer list and import a new customer mailing list every evening.       This is used for nightly batch processing to upload a complete customer list each night to keep everything in sync.  

"Empty Allowed" Explained
If this is YES it means that this is a "required field" can be null or an empty string if no data is available, while it still needs to be mapped it's possible that there are situations which prevent you from including data. For example if a cashier does not ask for the customers phone number, you are not able to pass this field even tho it is required it will not error if it's empty.  However the expected behavior is that there will be data in the field if available.  


OPTIONAL TWO WAY CUSTOMER SYNC
When a customer of a dealer updates their contact record on the dealers website we can automatically push that update back to you so you can keep your Dealer System in sync.  Dealers Love This Feature! 
If you're not familiar, every customer of a dealership will get their own personal website login using our software.   So they go to the dealers website, login and check their account.  When they do they can update their contact information such as name, address, phone, email, even profile photos,  on the dealers rewards website.

Often dealers will say.. "why don't this update my dealer system".. since not all Dealer Systems support our receiving customer file updates.  The answer is if you do, then we can pass this updated information to you via a webhooks which will fire off when they update their details on our websites.   Only about half our Dealer System integration partners support receiving this data from us, but it's a great feature to make the Dealer System more sticky since the customers of the Dealer Can keep their personal info updated.  

What happens is when a customer of a dealer goes to a dealers website, updates their contact info we post this updated information real-time to a "webhook" URL.   To setup this sync we just need to know the URL that you want us to post this customer data to.   Once that is added to the stores config every time one of their customers update their contact record it will also pass it over to you to update your Dealer System.  Please call 414-326-4100 and speak to Jason or Brandon about setting up this real-time two way sync, the only thing we need from you us the URL you want us to configure in the web hook for the store.   Once we add this URL it will automatically post any updated customer data back to you when they update it real-time.

Post Url

  https://api.riderrewards.com/uploadcustomerprofile  

- SSL is required

Headers

Name  Required      Empty Allowed   Notes
transactionidYesNoThis is the unique identifier for a transaction, generated by the BeginTransaction API endpoint. Links all the uploaded data together for a given feed.
PartnerAPIKeyYesNoAPI Key for approved partners, to be provided by More Than Rewards. To become an approved partner call More Than Rewards at 414-326-4100.
RRStoreAPIKeyYesNoStore's API key within the Rider Rewards system. Retrieved via the  GetMyDealerList  API endpoint.
RRStoreIDYesNoUnique store identifier within the Rider Rewards system. Retrieved via the GetMyDealerList  API endpoint.

* An error will not result if Max Length is exceeded. Data will be trimmed to this length.
+ These are set in the header WITHOUT base64, just regular header values.

Expected JSON Body To POST

{
  "transactionsummary": {
    "transactionid": "asdfas234234234h323guid1232",
    "partnertransactionid": "12154",
    "partnerstoreid": "12154",
    "RRStoreID": "12",
    "feedtype": "C",
    "startdate": null,  
    "enddate": null,
    "totalrowssent": "1000"
  },
  "rows": [
    {
      "PartnerCustomerID": "21sd21asd",
      "CustomerRewardNumber": "AA1234",
      "CustomerFirstName": "John",
      "CustomerLastName": "Doe",
      "CustomerAddress": "1177 W Northbranch Dr",
      "CustomerCity": "Oak Creek",
      "CustomerStateProvince": "WI",
      "CustomerZipOrPostalCode": "53154",
      "CustomerCountry": "USA",
      "CustomerBirthMonth": "1",
      "CustomerBirthDay": "1",
      "CustomerBirthYear": "1955",
      "CustomerPrimaryPhoneType": "4143264100",
      "CustomerMobilePhone": "4143264100",
      "CustomerHomePhone": "4143264100",
      "CustomerWorkPhone": "4143264100",
      "CustomerClass": "1",
      "CustomerClubName": "VIP",
      "CustomerGender": "M",
      "CustomerEmail": "support@morethanrewards.com",
      "CustomerNationalHOGNumber": "21sd21asd",
      "CustomerNationalHOGExpireMonth": "1",
      "CustomerNationalHOGExpireDate": "2",
      "CustomerNationalHOGExpireYear": "2018",
      "CustomerIsLocalHOGChapterMember": "Y"
    },
    {
      "PartnerCustomerID": "21sd21asd",
      "CustomerRewardNumber": "AA1234",
      "CustomerFirstName": "John",
      "CustomerLastName": "Doe",
      "CustomerAddress": "1177 W Northbranch Dr",
      "CustomerCity": "Oak Creek",
      "CustomerStateProvince": "WI",
      "CustomerZipOrPostalCode": "53154",
      "CustomerCountry": "USA",
      "CustomerBirthMonth": "1",
      "CustomerBirthDay": "1",
      "CustomerBirthYear": "1955",
      "CustomerPrimaryPhoneType": "4143264100",
      "CustomerMobilePhone": "4143264100",
      "CustomerHomePhone": "4143264100",
      "CustomerWorkPhone": "4143264100",
      "CustomerClass": "1",
      "CustomerClubName": "VIP",
      "CustomerGender": "M",
      "CustomerEmail": "support@morethanrewards.com",
      "CustomerNationalHOGNumber": "21sd21asd",
      "CustomerNationalHOGExpireMonth": "1",
      "CustomerNationalHOGExpireDate": "2",
      "CustomerNationalHOGExpireYear": "2018",
      "CustomerIsLocalHOGChapterMember": "Y"
    }
  ]
}


Body Description

Field  Required      Empty Allowed   Notes
transactionsummary


Object containing the fields described below.
transactionid
YesNoThis is the unique identifier for a transaction, generated by the BeginTransaction API endpoint. Links all the uploaded data together for a given feed.
partnertransactionid
YesNoA field designed for Partner's to pass their own reference / key to identify a transaction within the Rider Rewards System. Could be used in future API's for look ups.
partnerstoreid
YesNoA field designed for Partner's to pass their own reference / key to identify a store within the Rider Rewards System. Could be used in future API's for look ups.
RRStoreID
YesNoUnique store identifier within the Rider Rewards system. Retrieved via the GetMyDealerList  API endpoint.
feedtype
YesNoC = Customers
startdate
YesYesAlways 'null' or empty string for this feed. This is because entire customer data set is uploaded every time, not a specific date range of customer data.
enddate
YesYesAlways 'null' or empty string for this feed. This is because entire customer data set is uploaded every time, not a specific date range of customer data.
totalrowssent
YesNoNumber of objects in the 'rows' array. The amount of records being sent in the given API request.  




rows


Array containing any number of objects with the fields described below.
PartnerCustomerID
YesYesAllows you to pass a key to reference this customer in possible future API endpoints
CustomerRewardNumber
YesYes
CustomerFirstName
YesYes
CustomerLastName
YesYes
CustomerAddress
YesYes
CustomerCity
YesYes
CustomerStateProvince
YesYes
CustomerZipOrPostalCode
YesYes
CustomerCountry
YesYesE,g.  USA, CAN, EUR, AUS
CustomerBirthMonth
YesYes
CustomerBirthDay
YesYes
CustomerBirthYear
YesYesE.g. 1950,1985
CustomerPrimaryPhoneType
YesYes
CustomerMobilePhone
YesYes
CustomerHomePhone
YesYes
CustomerWorkPhone
YesYes
CustomerClass
YesYes
CustomerClubName
YesYes
CustomerGender
YesYes
CustomerEmail
YesYes
CustomerNationalHOGNumber
YesYes
CustomerNationalHOGExpireMonth
YesYes
CustomerNationalHOGExpireDate
YesYes
CustomerNationalHOGExpireYear
YesYes
CustomerIsLocalHOGChapterMember
YesYes

* An error will not result if Max Length is exceeded. Data will be trimmed to this length.

Sample Results

Success Message

{
  "results": {
    "message": "Success",
    "transactionid": "1232",
    "batchid": "1325",
    "uploadedtotal": "1000",
    "runningtotal": "3000",
    "expectedtotal": "4000",
    "feedtype": "C",
    "startdate": null,
    "enddate": null,
    "RRStoreID": "1215",
    "partnerstoreid": "154",
    "partnertransactionid": "154"
  }
}

runningtotal = This is the current count of records uploaded in the transaction
requesttotal= This is the total number of rows uploaded with this post, 1000 rows per post  in most cases
expectedtotalcount= This is the final count that the transaction is suppose to hit


Sample Failure Message - Example 1 

{
  "results": { "error": "There are more than 1000 rows of data within the post" }
}

Sample Failure Message - Example 2

{
  "results": { "error": "Tried to upload 1000, causing the total to go larger then the expected upload total. " }
}