Log Service Sale

Overview - Step 3 of 4 Upload Steps

More Than Rewards logs every single "line item" for the overall transaction, which means every line item from a WORK ODER will need to be posted via this API.   This includes a line item of a part and a line item of labor for a particular work order.   So  if someone is purchasing 5 parts and 2 hours of labor that's a total of 7 line item posts for this one particular work order number.    As as reminder this  API is for service work orders only and does not include service work tied to vehicle sales as those should be done via the logvehiclesale api.  Just as parts, clothing or accessories that are sold outside of a work order should be done via the logpartsale api.

This API is to post SERVICE WORK ORDERS which includes all PARTS and LABOR for a work order! 
Do Not Post "Vehicle Deal" service work or "Part Sales" that are sold outside of a work order to a customer. 

  • NOTE THE DEALERSHIP TERMINOLOGY  :  "Invoices" vs "Work Orders" vs "Vehicle Sales" 
    Typically most dealership has 3 departs; Vehicle Sales -This is where bike deals are processed,  Work Orders - This is where all service work outside of bike deals and part sales are done,  Part Sales - This typically where customers can walk up and purchase items off the shelf such as parts, clothing, accessories, food, or other items that are not part bike deals or service jobs.   Dealerships has the ability to control how each of these departments reward their customers,  the way we separate these 3 departments is via logpartsales,  logservicesales, and logvehicalesales  API.  

Very Important - Only POST when the ENTIRE work order is 100% paid in full.  
Since dealers only wish to reward on complete work orders AFTER the ENTIRE WORK ORDER has been 100% paid in full, the work order is closed, and the vehicle has been delivered.   You must not POST to this API until all those condition are met and you must post EVERY LINE ITEM detail of the ENTIRE WORK ORDER at that time, this is often refereed to as the "Final Cashiered Date" of the work order in various dealer systems.   If you do not follow these rules it will result in duplicate rewards being issued to a customers account.  This is because "reward rules" are apply to each "line item" of the work order, so if you post duplicate line items before the work order is closed then it will cause duplicate rewards to trigger. 

Therefore if someone is making a payment on a service job and has not picked up the complete  service job yet you should NOT  post the work order partial payments because it has not yet been 100% paid in full nor picked up, instead you should wait until the entire work order is paid for.    

For Example
If someone has a work order that is $1000 and makes 2 payments  on it, one payment of $500 on the 1st of the month, then they pay the remaining $500 on the 15th but do not pick up the bike until the 20th.   The 20th is the day that you will post the full $1000 to this API as that is the day the customer has picked up the bike from the service department.   

If you do not have the ability to post to this API when the vehicle has been picked up then you can do it when the entire work order is 100% paid in full, as long as you do not post partial payments you should be fine.   We do recommend you try to do it on the day the bike is picked up since some dealers have rules that says "you don't get your reward until the bike is picked up".   However, if that's not possible you can post the ENTIRE work order on the day it's 100% paid for and that will be fine in most cases.   

So in the example above posting every line item from the work order is acceptable to do on the 15th (when it's 100% paid for) or on the 20th (when it is delivered to the customer), either option would work.   As long as you're not posting the  entire work  order when partial payments are paid you are fine as that would result in duplicate rewards being issued since the same work order would be posted twice in the situation above, which is what you want to avoid.  

Very Important - Do Send Over Special Orders Unless Paid In Full
DO NOT submit any item that is sold as a "Special Order" unless the item is 100% paid for and picked up at the time of cashiering the invoice.   If you post items that are special order but not yet picked up then the customer will earn reward every time they make a payment on the special order.   You should ONLY post a special order item with the invoice if the special order item was actually picked up.   If you do not follow these instructions the customer will receive rewards multiple times please be very careful not to do this, as it will cause problems with the dealership because it will cause them to award customers more points then they should and they will be contacting you as to why you're doing this. 

Very Important - Understanding "The Total Sold To Sold Price" vs "Total Retail Price"
This is how we determine if an item is ON SALE OR NOT, if the "total sold to" price is less than than the "total retail price" then this line item transaction will be flagged as "on sale".   If you do not post the correct values here for both fields it could result in the customer earning rewards on items they do not wish to  earn rewards on as many customers choose not to reward  on sale items.     In most cases if the item is not on sale or discounted then these two values will be exactly the same.  

Very Important - Understanding Returns vs Sales - Returns Need Post as NEGATIVE 
Return transactions should be submitted  via NEGATIVE value while sale are submitted via positive cash values.

Understanding - "Empty Allowed"
If this is YES it means that this is a "required field" can be  empty 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 it must be included if it's available otherwise it will cause problems with the customer.  

For example your system has the mobile number yet you choose not to include it in the request then and the customer has configured the reward system to send mobile alerts then the functionality the customer is expecting will not work.  When they call our support department for help with this we will be forced to explain to them that the reason our system does not sending text  notifications is because your not passing us the correct information.   Therefore it's critical that you post all the data that you have available so all special reward configurations that each customer setup will work as expected.   

The intention behind "Empty Allowed" is just to let you know that the API will NOT error if the field is blank even tho it is required.  

Post Url

  https://api.riderrewards.com/logservicesale  

- 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": "S",
    "startdate": "05/01/2018",  
    "enddate": "05/15/2018",
    "totalrowssent": "1000"
  },
  "rows": [
    {
      "cashierintials": "154",
      "cashierfirstname": "154",
      "cashierlastname": "154",
      "cashierphone": "154",
      "cashieremail": "154",
      "partnercashierid": "154",
      "WorkOrderNumber": "154",
      "JobPartNumber": "154",
      "JobPartDesc": "154",
      "JobLineNote": "154",
      "JobLineType": "154",      
      "JobLineisWarranty": "154",
      "JobLineisPrePaidMaint": "154",
      "SubTotalRetailPrice": "154",
      "SubTotalRetailQty": "154",
      "TotalRetailPrice": "154",
      "SubTotalActualPrice": "154",
      "SubTotalActualQty": "154",
      "TotalActualPrice": "154",
      "CurrencyType": "154",
      "CompleteDate": "154",
      "TechnicianIntials": "154",
      "ServiceWriterIntials": "154",
      "VehicleYear": "154",
      "VehicleMake": "154",
      "VehicleModel": "154",
      "VehicleVIN": "154",
      "VehicleColor": "154",
      "VehicleOdometer": "154",
      "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"
    },
    { 
      "cashierintials": "154",
      "cashierfirstname": "154",
      "cashierlastname": "154",
      "cashierphone": "154",
      "cashieremail": "154",
      "partnercashierid": "154",
      "WorkOrderNumber": "154",
      "JobPartNumber": "154",
      "JobPartDesc": "154",
      "JobLineNote": "154",
      "JobLineType": "154",      
      "JobLineisWarranty": "154",
      "JobLineisPrePaidMaint": "154",
      "SubTotalRetailPrice": "154",
      "SubTotalRetailQty": "154",
      "TotalRetailPrice": "154",
      "SubTotalActualPrice": "154",
      "SubTotalActualQty": "154",
      "TotalActualPrice": "154",
      "CurrencyType": "154",
      "CompleteDate": "154",
      "TechnicianIntials": "154",
      "ServiceWriterIntials": "154",
      "VehicleYear": "154",
      "VehicleMake": "154",
      "VehicleModel": "154",
      "VehicleVIN": "154",
      "VehicleColor": "154",
      "VehicleOdometer": "154",
      "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  Max Length*   Required      Empty Allowed   Notes
transactionsummary


Object containing the fields described below.
transactionid
50YesNoThis is the unique identifier for a transaction, generated by the BeginTransaction API endpoint. Links all the uploaded data together for a given feed.
partnertransactionid
50YesNoA 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
50YesNoA 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
50YesNoUnique store identifier within the Rider Rewards system. Retrieved via the GetMyDealerList  API endpoint.
feedtype
50YesNoS = Service Sales
startdate
50YesNoStart date received from the Ready Feed Upload
enddate
50YesNoEnd date received from the Ready Feed Upload
totalrowssent
50YesNoNumber 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.
cashierintials
50YesYesIf you leave this  blank some functionality may not work, we recommend that you do not leave this blank.  Dealers will  not be able to see who cashiered the sale via the rewards portal which makes the rewards portal look "incomplete"
cashierfirstname
50YesYesFirst name of the cashier.
cashierlastname
50YesYesLast name of the cashier. Optional, may be left blank.
cashierphone
50
YesYesOptional, may be left blank.
cashieremail
50YesYesOptional, may be left blank.
partnercashierid
50YesYesOptional, may be left blank. Allows the API user to pass a their own unique identifier for a given cashier within the Rider Rewards system. Could be utilized in future API endpoints.
WorkOrderNumber
50YesNoThis is the work order  number, we capture line by line so several posts will be made with the same work order number. 
JobPartNumber
100YesNoIf this is labor line it should prefix with the word be the string "LABOR -"  so the first thing in the string has the word LABOR in it. 
JobPartDesc
500YesNoIf this is labor line it should be the string "LABOR -"
JobLineNote
2500YesNoTypically this is on the line associated with labor as it's the spot where the tech writes the note of what the labor is for.  Such as a "install handle bars" or "provide 5K service, investigate issue".   This is where tech might write a note or something related to the particular work order. 
JobLineType
1YesNoP = Part
L = Labor
D = Line Item Discount Parts
F = Line Item Discount Labor
JobLineisWarranty
1Yes No0 = False
1 = True
JobLineisPrePaidMaint
1YesNo0 = False
1 = True
3 = Unknown   (Some dealer systems  can't determine if this prepaid or not, if that's the case you an simply just set this value to 3) 
SubTotalRetailPrice
moneyYesNoThe money format must be 2 decimal places.  Example $1 is 1.00 
SubTotalRetailQty
intYesNoUse  whole numbers like 1 , this is qty of the item.  You should be able to multiple this field by the SubTotalRetailPrice field and you will get the value in the TotalRetailPrice field.
TotalRetailPrice
moneyYesNoThe money format must be 2 decimal places.  Example $1 is 1.00
SubTotalActualPrice
moneyYesNoThe money format must be 2 decimal places.  Example $1 is 1.00
SubTotalActualQty
intYesNoUse  whole numbers like 1 , this is qty of the item.  You should be able to multiple this field by the SubTotalActualPrice field and you will get the value in the TotalActualPrice field.
TotalActualPrice
moneyYesNoThis is the total amount of money this line item was sold for.  So if the item was discounted then this value will be less then the "TotalRetailPrice" field, if it's not discounted then it should be exactly the same. 
CurrencyType
3YesNoUSD = US Dollar
CAD = Candian Dollar
EUR = Euro
CompleteDate
datetimeYesNoDate time MUST be in the format of  mm/dd/yyyy
TechnicianIntials
50YesYesIf you leave this  blank some functionality may not work, we recommend that you do not leave this blank.  Dealers will  not be able to see who was the tech on the rewards portal which makes the rewards portal look "incomplete"
ServiceWriterIntials
50YesYesIf you leave this  blank some functionality may not work, we recommend that you do not leave this blank.  Dealers will  not be able to see who was the service writer via the rewards portal which makes the rewards portal look "incomplete"
VehicleYear
4YesYesIf you leave this  blank some functionality may not work, we recommend that you do not leave this blank.
VehicleMake
50YesYesIf you leave this  blank some functionality may not work, we recommend that you do not leave this blank.
VehicleModel
100YesYesIf you leave this  blank some functionality may not work, we recommend that you do not leave this blank.
VehicleVIN
100YesYesIf you leave this  blank some functionality may not work, we recommend that you do not leave this blank.
VehicleColor
25YesYesIf you leave this  blank some functionality may not work, we recommend that you do not leave this blank.
VehicleOdometer
25YesYesIf you leave this  blank some functionality may not work, we recommend that you do not leave this blank.
CustomerRewardNumber
7YesYesIf this is a reward sale it MUST have the reward number if this is NOT a reward sale the it should blank.  Remember we need both Reward  Sales and Non-Reward sales for the reward system to work. This is because there are reports that the dealer users to compare how many "reward sales" vs "non-reward" sales they have.  So if you do not include every non-reward sale this report and other functionality will not work.   
CustomerFirstName
50
YesNoFirst name of the customer
CustomerLastName
50

Last name of the customer
CustomerAddress
200YesYesIf available must include for functionality to work correctly.
CustomerCity
200YesYesIf available must include for functionality to work correctly.
CustomerStateProvince
50YesYesIf available must include for functionality to work correctly.
CustomerZipOrPostalCode
50YesYesIf available must include for functionality to work correctly.
CustomerCountry
3YesYesOne of the following 3 digit codes must be  used USA, CAN, AUS, EUR, JPN, DEU, GBR
CustomerPrimaryPhoneType
10YesYesMust include a phone number if you have it on file.  A 10  digit phone number must be provided if it is not a 10 digit number the number will  set to an empty string.  Reward  Customers can lookup their account balance by their primary number.  If the  customer has a mobile phone we recommend you  use their "mobile" number as the primary number as this is the number that they can use to lookup their account balance with via text/sms or if they don't know their reward number, they can use their primary phone number in place of it.  This is very common for most customers to just use their phone number.   Example 1-414-326-4100 should be  4143264100.  Must  be NUMERIC 
CustomerHomePhone
10Non/aOptional - Must  be NUMERIC -  Example 1-414-326-4100 should be  4143264100.  
CustomerMobilePhone
10YesYesMust  be NUMERIC -  Example 1-414-326-4100 should be  4143264100.   This should be the  primary number in most cases.
CustomerWorkPhone
10Non/aMust  be NUMERIC -  Example 1-414-326-4100 should be  4143264100.   This should be the  primary number in most cases.
CustomerEmail
100YesYesIf this is not available or included then we can not send them any kind of reward alert or "thank you" for visiting.  If you  have this available it needs to be included.  If it's not available you can leave it blank. 
CustomerBirthMonth
2YesYes1 = Jan  to  12 = Dec  (this is a number)
----
If you do not included this then we can not issue them special rewards on their birthday.
CustomerBirthDay
2YesYes1 to 31  (this is a number of the day)
----
If you do not included this then we can not issue them special rewards on their birthday.
CustomerBirthYear
4Non/aOptional - 4 Digit Year 
CustomerClass
50Non/aThis is just a friendly of a group that the dealer classifies a customer under such as whole salers, retail customers, ext.. in many cases this is just blank.
CustomerClubName
50Non/aThis is just a friendly name for any kind of riding club a dealer may have, in many cases this is blank.  
CustomerGender
1Non/aM = Male
F = Female
N = Neutral
U = Unknown
----
One of the  values above must be used, if no  data is passed then the value will be set to U
CustomerNationalHOGNumber
100Non/aMust be numeric 
CustomerNationalHOGExpireMonth
2Non/a1 to 12 (this is the H.O.G. club member expiration  month on their national HOG card)
CustomerNationalHOGExpireDate
2Non/a1 to 31 (this is the H.O.G. club member expiration  month on their national HOG card)
CustomerNationalHOGExpireYear
4Non/aThis is the H.O.G. club member expiration  year on their national HOG card,  if you pass "LIFE" to this parm it will flag their card as Life  Member.
CustomerIsLocalHOGChapterMember
1Non/aThis value can be
0 = False
1 = True
3 = Unknown
----
If the value is set to 1 the national HOG values must be included, if they are not then this value will be set to 3  (aka Unknown).  This is because you can not have a local hog member without a national HOG card
----------------------

* An error will not result if Max Length is exceeded. Data will be trimmed to this length.
* All parameters and URLs en d points are NOT case sensitive. 

Sample Results

Success Message

{
  "results": {
    "message": "Success",
    "transactionid": "1232",
    "batchid": "1325",
    "uploadedtotal": "1000",
    "runningtotal": "3000",
    "expectedtotal": "4000",
    "feedtype": "S",
    "startdate": "05/01/2018",
    "enddate": "05/15/2018",
    "RRStoreID": "1215",
    "partnerstoreid": "154",
    "partnertransactionid": "154"
  }
}

Sample Failure Message

{
  "results": { "error": "Authentication failed" }
}