Ask a Question

Filter patients by spending habits

How could I filter to see who my top 3, 5, or 10 spending patients are? Could I see that over 30, 60, 90 days or the entirety of our site's operations? I've tried utilizing the Sales tab and can source some info but not exactly this. Could you help me?



Merged Customers and Related behavior with the Customer API and Webhooks

Treez has updated the way merged customers are displayed through our API, enabling Partners and operators to better track merged profiles. When using GET/ Customer endpoints, the resulting post-merge account will be the primary and have a value called MERGED_CUSTOMER_IDS associated with it. This field will display all profile IDs that have been merged into the resulting account and will have a STATUS listed as 'MERGED'. On top of that, a note will be added into the NOTES field that details the time and date of when the merge occurred. When using the GET/ Customer endpoints with merged and deactivated profiles you'll see similar behavior as with an active profile. The STATUS for a merged and deactivated account will be listed as 'DEACTIVATED' and associated with a new field called MERGED_INTO_CUSTOMER_ID which will display the member ID that profile was merged into The changes to our APIs for Merged profiles also carries over to our Update Customer API. When you attempt to use the Update Customer API with an account that has been merged and deactivated the request will fail and Treez will return an error message that will include the Member ID for MERGED_INTO_CUSTOMER_ID (i.e. the resulting customer profile). There is also a new event that will trigger our customer webhooks. Whenever two accounts have been merged in Treez you'll receive separate payloads for both the surviving profile and the merged/deactivated profile. The payloads will include the values MERGED_INTO_CUSTOMER_ID and MERGED_CUSTOMER_IDS.

What is the Sellable_Quantity Cap?

What’s the Difference between Flat vs. Tier Pricing?

The price of a product in Treez is listed in the “pricing” array, and there are two pricing methods available. Partners should look at the “price_type” field to identify the pricing method being used for a product. You can expect the following behavior based on what is populated in the “price_type” field: - If price_type = "FLAT", the “price_sell” field will be the price of the unit as a whole, not the price per gram. - If price_type = "TIER", the “price_sell” field will be "null". In these cases, refer to the "tier_pricing_detail" array to see how the retailer specifies this. - If tier_method = "UNIT", the "start_vaue" in the "tier_pricing_detail" array will indicate the number of units which qualify for the "price_per_value" that follows. - If tier_method = "WEIGHT",the "start_vaue" in the "tier_pricing_detail" array will indicate the number of grams which qualify for the "price_per_value" that follows. Check out the [sample response](https://code.treez.io/docs/sample-response-4) for the product API. The behavior that can be expected from this Tier Pricing scheme is described below: - The first start value indicates the tier pricing starts at 1 UNIT and that unit is priced at $10.00. - The next start value indicates the tier pricing changes at 3 UNITS and that each of those 3 units are priced at $8.00. - The next start value indicates the tier pricing changes at 7 UNITS and each of those 7 UNITS are priced at $6.00. - If the quantity of UNITS ordered is in between 2 tiers (e.g.the customer orders 2 units, which falls between the start_value of 1 and the start_value of 3), the price per unit is $10.00 because it doesn’t qualify for the start_value of 3 but meets/exceeds the start_value of 1. If the tier_method = "WEIGHT", the above applies in the same manner but replaces the number of UNITS with the number of WEIGHT in grams. The WEIGHT value is determined by the AMOUNT field in the Product API response.

What Resources are Available to Me as a Partner?

Treez has done its best to provide the necessary tools for partners to be able to build an integration without needing hands-on guidance from Treez. The key to using these resources is knowing how to access them. All Partners have access to the following: 1. Code.treez.io - Home to all the documentation available for API information. Partners can find sample responses, parameter definitions, updates specific to the API, and our API Dev Portal that can make calls to your sandbox instance. 2. Partnersandbox2.treez.io - The test environment that all partners are given access to when brought on as a partner. This is the environment that will be used to test your integration. We encourage all partners to add their own data to this site to become familiar with Treez UI. 3. Treez Help Center - All of the training articles that customers have access to. This can be accessed after signing into partnersandbox2. The help center contains everything you need to become a master with Treez. 4. [email protected] - API-specific support channel for our partners. Whenever you cannot answer a question through any of the other resources, Treez offers an API support team who will be there to help!

What's the Difference Between Updating Customers Compared to Updating Tickets and Products?

Updating the customer can be a tricky proposition for new partners. Unlike the Update Product and Ticket endpoints, the Update Customer endpoint actually uses a POST to update the customer. This means that when a customer profile needs to be updated in any way you need to include the entire profile in the request. Even if fields are not getting updated, they must be included in the request, otherwise they will be removed from the customer profile. It is imperative for any partner using the Update Customer endpoint to understand this nuance. Partners should be aware that there is a customer-facing log that can be used to see where customer profile edits originate from; all changes through the API can be traced back to the partner through this log. The Update Product and Ticket API are more straightforward to work with compared to the Update Customer endpoint. Since both the update Product and Ticket endpoints use a PUT request, partners only have to pass the fields they want to update without worrying about removing other fields.

How Can I use the Above Threshold Field

There is a new field available in the Product API that will assist partners with getting only products that have inventory available for sale! This will help relieve call volume and let partners update their menus faster than ever before. The “above_threshold” field tracks whether a product has more sellable inventory than the “minimum_visible_inventory_level”. The “minimum_visible_inventory_level” field indicates when a product should be hidden from the menu because it has dropped below a certain threshold that is set by the retailer in their eCommerce configurations. When the inventory count falls below “minimum_visible_inventory_level” the “above_threshold” will be marked as False for that product. The best part of the “above_threshold” field is that it can be used as a query parameter in the GET List of Products endpoint. If you call the endpoint below you will only get products that have more sellable inventory than the “minimum_visible_inventory_level”: https://api.treez.io/v2.0/dispensary/partnersandbox2/product/product_list?&above_threshold=true This should drastically decrease the number of products you get back in the response and limit the products displayed to those with inventory available for sale. Using this field should cut down call volumes significantly and provide the inventory data faster than ever before.

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.

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.