Log Part Sale

Overview - Step 3 of 4 Upload Steps

More Than Rewards logs every single "line item" for the overall transaction / invoices, which means every sale transaction line item will need to be logged as a individual transaction.  So  if someone is purchasing 5 parts on one invoice then you'll need to make 5 distinct API calls to log each line item of that invoice via this API.    As as reminder this  API is for parts, clothing, accessories that are sold outside of bike and service sales.  All service work orders or vehicle deals which includes parts are done via the logservicesale api  and logvehiclesale api.  

Do Not Post "Vehicle Deal" part data or "Service Work Order" part data  to this API .    
This is API is to "Log Part Sales, Clothing, Accessories" but NOT for Bike Deals and Not For Service Work. 


Understanding - Invoices vs Work Orders vs Vehicle Sales 
Invoices are reserved for clothing, accessories, part sales sold outside of the service or vehicle sales department, while work orders will contain labor and parts designed for sales within the service department, while vehicle sales are reserved for major units, accessories, parts, clothing, labor  that is all sold at the time of the  vehicle sale.   Invoices are completed via the LogPartSale,  Work Orders re completed via LogServiceSale and VehicleSales are completed via the LogVehicleSales

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 Returns vs Sales - Returns Need Post as NEGATIVE 
Return transactions should be submitted  via NEGATIVE value while sale are submitted via positive cash values. 

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.  

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.  

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/logpartsale  

- 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": "P",
    "startdate": "05/01/2018,  
    "enddate": "05/15/2018",
    "totalrowssent": "1000"
  },
  "rows": [
    {
      "PartnerCustomerGroupID": "154",
      "cashierintials": "154",
      "cashierfirstname": "154",
      "cashierlastname": "154",
      "cashierphone": "154",
      "cashieremail": "154",
      "partnercashierid": "154",
      "lineitemtype": "P",
      "transactioncurrencytype": "154",      
      "invoicedate": "154",
      "invoicenumber": "154",
      "partcategorycode": "154",
      "partnumber": "154",
      "partdesc": "154",
      "quantity": "154",
      "cost": "154",
      "totalcost	": "154",
      "retailprice": "154",
      "totalretailprice": "154",
      "actualprice": "154",
      "totalactualprice": "154",
      "specialorder": "154",
      "transactiondate": "154",
      "rewardgroupid": "154",
      "rewardgroupname": "154",
      "rewardgroupmultiplier": "154",
      "notes": "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"
    },
    {
      "PartnerCustomerGroupID": "154",
      "cashierintials": "154",
      "cashierfirstname": "154",
      "cashierlastname": "154",
      "cashierphone": "154",
      "cashieremail": "154",
      "partnercashierid": "154",
      "lineitemtype": "P",
      "transactioncurrencytype": "154",      
      "invoicedate": "154",
      "invoicenumber": "154",
      "partcategorycode": "154",
      "partnumber": "154",
      "partdesc": "154",
      "quantity": "154",
      "cost": "154",
      "totalcost": "154",
      "retailprice": "154",
      "totalretailprice": "154",
      "actualprice": "154",
      "totalactualprice": "154",
      "specialorder": "154",
      "transactiondate": "154",
      "rewardgroupid": "154",
      "rewardgroupname": "154",
      "rewardgroupmultiplier": "154",
      "notes": "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  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
YesNoField designed for API user (Partner) 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
YesNoField designed for API user (Partner) 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
YesNoP = Parts / Store Sales
startdate
YesNoStart date received from the Ready Feed Upload
enddate
YesNoEnd date received from the Ready Feed Upload
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.
PartnerCustomerGroupID
Non/aOptional - This used by the partner to store cross reference information if they need to look up  data in our system.
cashierintials
Non/aOptional - This used by the partner to store cross reference information if they need to look up  data in our system.
cashierfirstname
YesYesE.g. Jason
cashierlastname
NoYesE.g. Brown
cashierphone
NoYesE.g. 414-326-4100
cashieremail
NoYesE.g. JasonBrown@aol.com
partnercashierid
NoYesOptional - This used by the partner to store a cross reference information if they need to look up  data in our system.
lineitemtype
YesNoP = Part
L = Labor
W = Warrenty Job
M = Misc. (this is for other types that are not Parts , Labor) 
transactioncurrencytype
YesNoUSD = US Dollar
CAD = Candian Dollar
EUR = Euro
invoicedate
YesNoThis is the date of the invoice that was generated should be .. MM/DD/YYYY
invoicenumber
YesNoAlpha numeric number field for the invoice number.
partcategorycode
YesNoThis is the category that the part of this item will be under like "Helment" "Gloves" or "AA12" or "B" it's a way to just group parts in certain categories.
partnumber
YesNoThis is the part number that is in the stores inventory for this inventory item.  
partdesc
YesNoThis is a friendly short description of the part that is sold
quantity
YesNoThis is the total quantity numeric value of the items sold on this line in the cash register.
cost
YesNoThis is how much the item cost the dealership for this particular part, this is the dealers cost. 
totalcost
YesNoThis is the total cost which is the case x the qty 
retailprice
YesNoThis is the price that is listed in the price books for this part as the suggested retail price. 
totalretailprice
YesNothis is the retailprice x qty
actualprice
YesNoThis is the actual dollar amount that the item was sold for.  So if the autual price is less than the retail price then the item is discounted.   This is how we tell if a item is "on sale" or not. 
totalactualprice
YesNoThis is actual price x qty
specialorder
YesNoY = This is a special order item
N = This is a regular item not ordered. 
transactiondate
YesNoThis is the of the invoice and the entire transaction that was done.  This the date it was sold through the actual finalized sell date which is 99% of the time the invoice date. 
rewardgroupid
NoNoThis is the ID of a a special group the customer is in.  Some POS lets you put people in different groups like VIP, Police, Firefighter, HOG ext..   This is the PrimaryKey ID in YOUR system that i used for this gorup ID
rewardgroupname
NoNoThis is the friendly name of the group ID from rewardgroupID.   For example the rewardgroupID might be 2 and the RewardGroupName would be "HOG Member"
rewardgroupmultiplier
NoYesReward points multiplier for the specified group
notes
NoYes
CustomerRewardNumber
YesYesIf 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. 
CustomerFirstName
YesNoFirst name of the customer involved in the sale. If available must include for functionality to work correctly.
CustomerLastName


Last name of the customer involved in the sale.
CustomerAddress
YesYesIf available must include for functionality to work correctly.
CustomerCity
YesYesIf available must include for functionality to work correctly.
CustomerStateProvince
YesYesIf available must include for functionality to work correctly.
CustomerZipOrPostalCode
YesYesIf available must include for functionality to work correctly.
CustomerCountry
YesYesOne of the following 3 digit codes must be  used USA, CAN, AUS, EUR, JPN, DEU, GBR
CustomerPrimaryPhoneType
YesYesMust 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
NoYesOptional - Must  be NUMERIC -  Example 1-414-326-4100 should be  4143264100.  
CustomerMobilePhone
YesYesMust  be NUMERIC -  Example 1-414-326-4100 should be  4143264100.   This should be the  primary number in most cases.
CustomerWorkPhone
NoYesMust  be NUMERIC -  Example 1-414-326-4100 should be  4143264100.   This should be the  primary number in most cases.
CustomerEmail
YesYesIf 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
YesYes1 = 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
YesYes1 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
NoYesOptional - 4 Digit Year 
CustomerGender
NoYesM = 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
CustomerClubName
NoYes
CustomerClass
NoYes
CustomerNationalHOGNumber
NoYesMust be numeric 
CustomerNationalHOGExpireMonth
NoYes1 to 12 (this is the H.O.G. club member expiration  month on their national HOG card)
CustomerNationalHOGExpireDate
NoYes1 to 31 (this is the H.O.G. club member expiration  month on their national HOG card)
CustomerNationalHOGExpireYear
NoYesThis 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
NoYesThis 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.

Sample Results

Success Message

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

Sample Failure Message

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