Discussions
What Discounts Can I use as a Partner?
When creating tickets through the Ticket API, it is essential for partners to understand how discounts work with the API. There are three discounts types to be familiar with while working with the API: automatic discounts, POS discounts, and price adjustments. They each have their own behavior and partners need to know how to use each one.
Please read this article to better understand the Treez discount module and what discounts are available to our mutual customers: All About: Discounts.
1.Automatic Discounts
Automatic discounts are created through the Discount module in Treez and can only be applied to a ticket when the customer and/or items in the order qualify for a discount. There are no API endpoints available that allow partners to edit or manually apply these discounts to an order. Partners do have the ability to control whether an automatic discount is applied to an item in an order through the "apply_automatic_discounts" field. When set to False it will prevent automatic discounts from applying to the item. This field is contained in the item array so this field must be marked as False for every product on a ticket if the entire order is to be excluded.
2.POS Discounts
POS Discounts can be applied by partners through the Ticket API. POS discounts are equivalent to Cashier Discounts that are available in the Treez User Interface. There is a key difference between the functionality available in the API compared to the UI: POS discounts cannot be applied at the Cart level via the API, they can only be applied to individual line items of an order.
Below is the accepted format for the POS Discount array:
"POS_discounts": [
{
"id": null,
"discount_title": "test",
"discount_amount": 5.0,
"discount_method": "DOLLAR",
"cart": false
}
],
Within this array you can define the name of the discount, the amount, and whether it is a percentage or dollar amount discount. The name field is completely customizable and will appear in reporting, so use a consistent naming convention with these discounts for clarity.
Tip: You can accomplish a cart-level discount through your integration by distributing the desired discount amount across all items of the order.
3.Price Adjustments
Custom price adjustments is another discount feature that partners can use through the API. Like POS discounts, price adjustments can only be applied at the item level, not the cart level. Depending on whether a Treez instance is configured for pre-tax or post-tax pricing determines how the custom price adjustments will behave. If the instance is configured as pre-tax, a price adjustment will impact the subtotal of the item, reducing it to the price listed as the adjustment. Then, taxes are applied to the subtotal to get to the actual total of the order. When a Treez instance is configured for post-tax, custom price adjustments set the total price of the product after taxes. So, if you set the price to $10 for a product in a post-tax environment, the total amount for that sale will be $10 and the subtotal will be adjusted so the subtotal+tax is equal to the price adjustment of $10.
Posted by Zachary Speltz about 3 years ago
How Do I Prevent Adding Duplicate Profiles in Treez?
When adding new customer profiles into Treez, it’s important that partners perform checks to prevent adding any duplicate profiles. Creating multiple profiles for the same customer in Treez clutters the store's data and provides a less than ideal experience for our mutual clients and their customers. For example, duplicate profiles can cause the customer not to receive the discounts that they should. That’s why Treez has provided multiple endpoints for partners to utilize when looking for existing customer profiles. See below for all of the available endpoints:
GET/ Customer by Driver License:
https://api.treez.io/v2.0/dispensary/dispensary_name/customer/driverlicense/license
GET/ Customer by Phone:
https://api.treez.io/v2.0/dispensary/dispensary_name/customer/phone/phone
GET/ Customer by Email:
https://api.treez.io/v2.0/dispensary/dispensary_name/customer/email/email
GET/ Customer by First and Last Name:
https://api.treez.io/v2.0/dispensary/dispensary_name/customer/firstname/first_name/lastname/last_name
Treez provides endpoints based on the common information that our partners obtain through their app during sign-up. Suppose a partner is unable to locate a customer based on their first request. In that case, we suggest an iterative approach to search for the profile by other data fields (and their respective endpoints) that have been obtained from the customer. If partners are still unable to locate a matching customer, they should create a new account for the customer.
Posted by Zachary Speltz about 3 years ago
How do I find all the banned patients in our system?
I'm trying to update our black list for the dispensary but cannot discover a way to filter our patients so I can find the banned members. Any advice would be great!
Posted by Viviane Seals about 3 years ago
How to I view Products in Specific Inventory Location?
If you would like to view only products that reside in a specific inventory location with Treez, you can use the sellable_quantity_in_location filter.
https://api.treez.io/v2.0/dispensary/DISPENSARYNAME/product/product_list?sellable_quantity_in_location=CABINET 1&page=1&pagesize=50
The above example URI would provide first 50 (page=1 and pagesize =50) sellable products in a location called "CABINET 1". The location name is case sensitive and must be entered EXACTLY as it appears in the Treez instance. "cabinet 1" would not produce the desired response because the location name is in all lowercase letters while the location name in the Treez instance is capitalized.
*Please note that DISPENSARYNAME should be replaced with the first part of the dispensaries Treez URL. Example: If the retailers Treez URL is edmundsdispensary.treez.io then you should replace DISPENSARYNAME with edmundsdispensary
Posted by Edmund Ewell over 3 years ago
How do I get a client ID?
In order to received a client_id to access the Sell Treez APIs, you must be an Authorized Integration Partner. To begin the process of becoming an Authorized Integration Partner with Treez, please follow the steps outlined on our "Partner with Us" page (https://code.treez.io/page/partner-with-us). Once you have executed the mNDA and API Usage agreement out Business Development department will alert tour API Support team who will reach out with:
1. Your client_id (Used to access Production and Sandbox environments)
2. Your Sandbox API Key (Used inconjunct ion with your client_id to access the sandbox environment)
3. Sandbox Login credentials
Posted by Edmund Ewell over 3 years ago
How to determine a customers verification status?
When calling the Sell Treez Customer API (https://code.treez.io/docs/customer-apis), a value called verification_status will be returned. This indicates the customers current verification status within Treez. Additionally, a verification_reasons field will follow the verification_status.
If the value for this field is "VERIFIED", the customers documentation on file has been verified by the retail staff. New tickets submitted through the Ticket API should be placed in the "Awaiting Processing" Ticket status.
The verification_status for a VERIFIED customer will be empty.
If the value is "VERIFCATION_PENDING", the customers documentation has not been verified by the retail staff or otherwise needs to be reviewed. This usually indicates the profile was recently created, the drivers_license_expiration date has passed or the permit_expiration date has passed. New tickets submitted through the Ticket API should be placed in the "Verification Pending" Ticket status.
The verification_status for a VERIFIED_PENDING customer will detail why the customers needs to be verified.
Posted by Edmund Ewell over 3 years ago
What is the Difference between MEDICAL and MEDICAL_MMID patient_types?
The MEDICAL patient type pertains primarily to medical patients in California and is for for medical patients who have a Physicians recommendation to use cannabis in their state but are not registered with the State Licensing agency. Patients using this type will be required to have the permit_expiration field filled out indicating the date their recommendation paperwork expires (typically 1 year from date of issuance). They are not required to have the state_medical_id value filled in. In California, the MEDICAL patient type allows for increased purchase limits but is not exempt from California State Sales Tax.
The MEDICAL_MMID pateint_type is for medical patients in any state that issues state ID cards for medical cannabis users. Patients using this type will be required to have the permit_expiration and state_medical_id fields filled out. In States that track purchase limits through their state mandated Tack and Trace platform (METRC), the state_medical_id is used to validate the patients available purchase limits. In California, this patient type is allowed increased purchase limits and is exempt for California State Sales tax when configured as such in the retailers Tax Configuration.
Posted by Edmund Ewell over 3 years ago
Product Cost
Do any of the API's support COGS detail? On the Products Report_Product Summary report there are two fields: Cost Without Excise and Cost With Excise, I'm assuming these are COGS related. However, I don't see this kind of product cost information in the Treez API's.
Posted by Trevor over 3 years ago
Is there a pricing tier list/details endpoint?
For the product response you have a 'pricing' attribute which is an object with keys of 'price_type', 'price_sell', and 'tier_name'. Some products have a pricing object with `price_type` of `TIER` (from your example response):
"pricing": {
"price_type": "TIER",
"price_sell": null,
"tier_name": "40"
}
Is there a means of getting the actual price or tier information in those instances?
Posted by Wyatt Tigert over 4 years ago
API Response Limit
Is it possible to increase the API response limit from 50 to a higher number?
Posted by Meenal Sharma over 4 years ago