Discussions
Is there a list of possible cannabinoids that may be returned with lab results?
I need to standardized the cannabinoid formatting of lab results, and to do that I need to know what the possible return values for result_type are.
Posted by LC almost 2 years ago
Did the Sellable Quantity Cap Change?
The sellable_quantity cap for the Product API has recently been increased by 5 to a total of 30. When the total amount of inventory is over 30 the sellable_quantity field will only display 30. Once the total number of units drops below 30 the true value of the product will be available.
Posted by Zachary Speltz almost 2 years ago
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?
Posted by Dylan McCabe over 2 years ago
DAILY PURCHASE
HOW TO INCREASE DAILY PURCHSE LIMIT FOR A CUSTOMER WITH MEDICAL ID
Posted by JOSH over 2 years ago
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.
Posted by Zachary Speltz over 2 years ago
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.
Posted by Zachary Speltz about 3 years ago
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!
Posted by Zachary Speltz about 3 years ago
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.
Posted by Zachary Speltz about 3 years ago
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.
Posted by Zachary Speltz about 3 years ago