search-icon

LeafLink wholesale cannabis marketplace is one of the largest networks of licensed cannabis businesses in operation. Connecting 6200+ retailers with 2300+ brands and distributors, LeafLink streamlines cannabis commerce in the entire supply chain. The platform allows participants to easily:

  • send and receive orders with e-commerce tools;
  • tap into a large network of compliant cannabis businesses;
  • track order statuses with easy-to-use dashboards;
  • streamline communication with messaging features;
  • and to optimize operations for Brands with:
    • e-commerce marketplace capabilities;
    • order management workflow;
    • CRM system;
    • reporting tools.


Integrating LeafLink with DEAR gives LeafLink retailers, brands and distributors a powerful inventory management program, while existing DEAR users can expand their e-commerce reach by using LeafLink's marketplace platform. 


As of now, LeafLink is available for operation in Alaska, Arizona, California, Colorado, Connecticut, Illinois, Massachusetts, Maryland, Michigan, Nevada, New York, Oklahoma, Oregon, Pennsylvania, Puerto Rico and Washington states. LeafLink is only available in the United States. Retailers, brands, and distributors must have a valid commercial license issued by one of these states in order to ship to customers.


Since LeafLink is responsible for checking of proper licensing in business operations, this integration only supports one-way (LeafLink → DEAR) integration. Products can be listed and orders created at the LeafLink e-store side only.


Prerequisites

  • A valid license is required to register on LeafLink for commercial purposes. Please direct questions about obtaining licenses to LeafLink directly. 
  • Register as a LeafLink brand and configure account, including:
    • Provide master user/account owner information
    • Provide company and license information
    • At least one user account
    • At least one brand 
    • Configure inventory of products with all required properties
    • Configure customers
      • Credentials
      • Licenses
      • Price tiers
      • Payment terms
      • Delivery fees
      • etc.
    • Create API security keys


Table of Content


Setting up LeafLink integration in DEAR

[back to top]


In order to setup an integration, you will need to have first registered an account as a LeafLink brand with a valid commercial license and at least one brand. 


As of now, LeafLink is available for operation in Alaska, Arizona, California, Colorado, Connecticut, Illinois, Massachusetts, Maryland, Michigan, Nevada, New York, Oklahoma, Oregon, Pennsylvania, Puerto Rico and Washington states. 


Account must be set up with 

  • Master user/account owner information
  • Provide company and license information
  • Configure inventory of products with all required properties
  • Configure customers
  • Credentials
  • Licenses
  • Price tiers
  • Payment terms
  • Delivery fees
  • etc.


One DEAR account can be connected to multiple LeafLink e-stores and one LeafLink store can be connected to multiple DEAR accounts. 


Connecting DEAR to LeafLink

[back to top]


First, you need logon to LeafLink with an admin or developer account and go to Settings → Company Information

Turn ON Enable Developer Options Access.


Secondly, go to Settings → Applications → API Key to generate the API key by clicking on relevant buttons. Make a note of your API Key. Next, go to Developer Options and make a note of your Company ID. Next, return to DEAR to connect the LeafLink store.

  1. Navigate to Integrations  → LeafLink.
  2. Click + to connect a new store. It's possible to use one DEAR account with multiple LeafLink e-stores and the same LeafLink store with multiple DEAR accounts. 
  3. Enter your the following info:    
    • LeafLink Shop name: Name of the e-shop, as it is set on LeafLink account page
    • Company ID: LeafLink Company code
    • License ID: Cannabis ID license for the company
    • API key: Secure API authorisation key generated for account in LeafLink management interface
  4. Now click Connect to LeafLink.
  5. To give DEAR access to your account/shop, click Allow Access. You will then be taken back to DEAR.


NOTE: Currently store segregation is implemented via different brands registered by LeafLink. To add a new brand in LeafLink, log in to your LeafLink account, go to the Settings → Brands tab and Request New Brand


Integration Settings

[back to top]


Once you've connected DEAR to your LeafLink account, you can then configure the integration settings between the two systems under the Setup tab on the LeafLink Integration page in DEAR.


General settings

[back to top]


Capture of Orders in DEAR

DEAR can capture orders from LeafLink when:

  • Order is accepted (buyer/seller licenses have been checked). 
    • Applies to LeafLink statuses: Accepted, Fulfilled, Shipped, Completed, Rejected, Cancelled, Combined
  • Order is (fully) paid.
    • Applies to LeafLink statuses: Fulfilled (with IsPaid field ON), Shipped, Completed, Rejected, Cancelled, Combined
  • Order is completed.
    • Applies to LeafLink statuses: Completed, Rejected, Cancelled, Combined.


Submitted, and Backorder statuses are ignored


Order Consolidation

Sales are processed in DEAR using any of the two consolidation types.

  • No Consolidation indicates that all walk-in/cash register sales will be created as individual sales orders in DEAR. 
  • Daily Consolidation will consolidate all sales for the day into a single sales order. 

When Daily Consolidation is chosen, a Consolidation Time setting becomes available. This is your local time when all pending orders aggregated during the day will be processed.


Customer

An existing customer in DEAR Inventory will need to be selected for pending order processing to work in certain scenarios. 

  • When Consolidation Type = Daily Consolidation, this customer is used to create a new sales task which will combine all daily sales into a single sale. 
  • When Consolidation Type = No Consolidation, this customer is used in cases where customer information is not provided. If customer info exists in the sale order, then this setting is ignored.


Wholesale Price Tier

This setting determines which DEAR product price tier to use when selling wholesale products. 


Sale Price Tier

This setting determines which DEAR product price tier to use for non-wholesale product transactions. If there is no sale price in LeafLink, the wholesale price will be used. 


Regular Price Tier

This setting determines which DEAR product price tier to show MSRP (informational only - this price does not affect transactions). 


Pick, Pack and Ship processing mode

This setting tells DEAR if it should try to Auto Pick, Auto Pack and Auto Ship items for sale tasks created when a pending order is processed by DEAR. If there is not enough stock on hand to pick the full quantity of products in an order, then Pick should remain in "Draft" state and Pack and Ship won’t be done. DEAR does not pick up shipment information from LeafLink and will not create fulfillment in LeafLink if auto-ship is selected.


Process Auto-Assembly as

This dropdown field has two options:

  • For ordered quantity: Does not check stock quantity. An assembly order is created for the quantity specified in the sale order, regardless of stock availability. 
  • For minimum quantity required for picking: Assemble stock required to meet the quantity of specific sale order. 
    • If stock availability is negative, auto-assembly will produce a finished goods quantity which is more than the quantity ordered through sale order. 
    • If there is already stock available in inventory but not enough to fulfill the sale order quantity, auto-assembly will assemble the difference in quantity needed to meet the sale order requirement.
    • If stock availability exceeds sale order quantity, auto-assembly is not triggered. 

Stock availability is validated against the sale order location and does not take On Order quantity into account.


Link LeafLink store to DEAR location 

Choose a DEAR location to use for LeafLink store sales fulfillment. Each LeafLink store should have a dedicated Location within DEAR, which can be selected from the drop-down menu. One Location might be used for several stores. Selecting a particular warehouse should limit the availability of stock in LeafLink to that location. If the default option ("All Locations") is chosen DEAR will display consolidated stock quantities across all its the locations.


Account and cash settings

[back to top]


Invoice Status

You can control the invoice status for sales tasks created as a result of pending order processing. By default, an Invoice will not be authorised and will be in Draft state, adjustable and waiting for authorisation. However, if this setting is changed to AUTHORISED, the invoice will be automatically created and authorised. It can then be synced with your preferred accounting application.


Sales Representative Name

This option allows the entered name to be used as the Sales Representative for the sales task.

 

Optional Revenue Account

The revenue account to be used for all sales downloaded from LeafLink. This will override the settings at the Product/Customer level and any other Account mapping. 


Use LeafLink as Master Source for DEAR Products

This option sets the direction of structuring data flow between DEAR and LeafLink: when enabled, DEAR should not push product categories and brands to LeafLink. Instead, products in DEAR should be updated with categories and brands from LeafLink. Enabled by default. 


Update Stock Levels in LeafLink

Controls if stock level is updated automatically in LeafLink store by DEAR at the time when available product quantity changes in DEAR. This may be useful for manual managing stock level in LeafLink. Disabled by default. 

Please ensure you have the correct stock quantities entered in DEAR before you turn on this option as these values will override the stock quantities in LeafLink.


Export shipping information to LeafLink

Enable to export shipping information from DEAR to LeafLink. Enabled by default.


Tax mapping

[back to top]


 Orders will be skipped on download if tax rules are not mapped!


When DEAR processes a pending sale, it creates a sales task with order and invoice lines completed. This setting ensures consistent application of tax rules between LeafLink and DEAR. It is required to map tax rules loaded from LeafLink to tax rules set up in DEAR Inventory by selecting the relevant option from the DEAR Tax Rules list. 


Tax rules should be tax-exclusive. LeafLink do not provide detailed tax information per line of order, so DEAR distributes taxes across licensed product lines proportionally. 


NOTE: Generally LeafLink only applies an Excise tax to orders in CA, AR and PR (where only medical cannabis is legalised, while US federal taxes are zero). When another tax scheme is applied for customers in other US states, Other Excise tax is used. All other taxes (if necessary) are typically handled outside of LeafLink.



Map payment methods to payment accounts

[back to top]


DEAR captures payments made against orders in LeafLink and automatically adds payments to a created sale invoice when payment account mapping is configured. This setting is not mandatory – if payment mapping is not completed, orders are still captured and downloaded from LeafLink, but payments must be manually added to invoices in DEAR.


Disconnect from LeafLink

[back to top]


When you disconnect from your LeafLink store, DEAR removes all associations between this DEAR shop and LeafLink, including all logs and product catalog. Please take care when disconnecting from your LeafLink shop, as there is no way you can link DEAR and LeafLink again automatically without going through the initial setup operations again.


Catalog

[back to top]


The Catalog tab on the LeafLink Integration page is where you manage products and product quantity. From the Catalog tab, you can perform the following:

  • download products from LeafLink to DEAR
  • update (name, description, wholesale price, sale price, retail price) for individual products from DEAR to LeafLink
  • delete links between DEAR and LeafLink products
  • update stock levels in LeafLink from DEAR
  • download customers from LeafLink to DEAR


Search by typing SKU, Product Name or Category into the search field. Refresh shows the most recent catalog data. 


Downloading Products

[back to top]


From the Catalog tab, you can download either new products from LeafLink to DEAR, or update information (name, description, wholesale price, sale price, retail price) about existing products in DEAR based on updated product information from LeafLink. 


Downloading a product from LeafLink to DEAR will automatically create a specalised attribute set named LeafLink to store LeafLink specific values. If there is an existing attribute set named 'LeafLink' with attributes that are not exactly as expected an error will be displayed during product download or when adding a new store. 


To download products from LeafLink to DEAR:

  1. Under the Catalog tab, click Download → Products.
  2. On the Load Products from LeafLink window, click Load from LeafLink.


NOTE: Products are not downloaded as a product family. Each product variation will be downloaded as a separate product. 


Product field mapping

[back to top]


DEAR fieldLeafLink field
SKUSKU
Product NameName
DescriptionDescription
CategoryCategory
BrandBrand
Unit of measureUnit of measure
Price Tier value for Regular priceRegular price
Price Tier value for Wholesale priceWholesale price
Price Tier value for Sale priceSale price
ImagesImages
Product Attribute 1 (Licence)Licence*
Product Attribute 2 (Strain Name)*Strain Name*
Product Attribute 3 (Strain Type)*Strain Type*
Product Attribute 4 (Product Line)*Product Line*
Product Attribute 5 (Subcategory)*Subcategory*
Product Attribute 6 (Listing State)*Listing State*
Product Attribute 7 (Unit Denomination)*Unit Denomination*
Product Attribute 8 (Unit Multiplier)*Unit Multiplier*
Product Attribute 9 (Minimum Order)*Minimum Order*
Product Attribute 10 (Maximum Order)*Maximum Order (or maximum available)*

*DEAR will automatically create a specalised attribute set to store these LeafLink specific values.


Downloading Customers

[back to top]


From the Catalog tab, you can either create new customers in DEAR with contact information and addresses captured from LeafLink. Downloading customers will also update existing customer information if it has been changed in LeafLink. 


To download customer information from LeafLink to DEAR: 

  1. Under the Catalog tab, click Download → Customers.
  2. On the Load Customers from LeafLink window, click Load from LeafLink.


Customer field mapping

[back to top]


 DEAR fieldLeafLink field
Name, ContactName
CurrencyCurrency (USD only)
IDID
EmailEmail

BillingAddressState,

ShippingAddressState

State
BillingAddressCountry, ShippingAddressCountryCountry (United States is the only available country)
BillingAddressLine1, ShippingAddressLine1Address
BillingAddressPostcode, ShippingAddressPostcodeZipcode
ShippingAddressSuburb, BillingAddressSuburbCity
WebsiteWebsite


Updating Quantities

[back to top]


To update product quantities in LeafLink with the currently available quantities in DEAR:

  1. Under the Catalog tab, click Update Quantities in LeafLink.


Managing the Catalog

[back to top]


Due to legal restrictions, products can only be created in LeafLink. Individual products can be updated (name, description, wholesale price, sale price, retail price), unlinked, set to sync stock levels, or removed from LeafLink from the Catalog tab. 


Update a product

[back to top]


  1. Click on the product in the Catalog tab. 
  2. Enable or disable Sync Stock Level for that product. Disabling means stock levels will NOT synchronise for that product when there is a change in its stock level in DEAR.
  3. In the pop-up window, click Update on LeafLink.
  4. Save your changes.


NOTE: Updating a product from the catalog will update stock level in LeafLink, regardless of the sync stock level setting status.



[back to top]

  1. Click on the product in the Catalog tab. 
  2. Click Unlink from LeafLink.
  3. Click Save.


This will unlink the product in DEAR from LeafLink, but not remove it from LeafLink.


Remove a product

[back to top]

  1. Click on the product in the Catalog tab. 
  2. Click Remove from LeafLink.
  3. Click Save.


This will remove the product from LeafLink (but not in DEAR) by setting the product status to Archived.



Bulk Operations

[back to top]


Due to legal restrictions, products can only be created in LeafLink. Products can be updated, unlinked (breaks link without removing product from LeafLink) or unlisted (sets LeafLink product to Archived) from this tab. Press Refresh to update the display. 

  1. Go to the Bulk Listing tab.
  2. Select products to update, unlist, or unlink in bulk. You can select products by Brand, Category, Product Tag. 
  3. Click Update/Unlist/Unlink to carry out the bulk operation.


Pending Orders

[back to top]


Orders are automatically downloaded when the order is created or order status changes in LeafLink. Generally, you are not required to trigger manual order download. However, if an order was not captured by DEAR or to load historical sales, you can use the Manual Order Download option available from the Pending Orders tab. DEAR allows loading historical sales data a maximum of one year old.


Whenever a sale is captured from LeafLink, it is first place into Pending Orders and stock is allocated. 


If No Consolidation is selected, each LeafLink sale is converted into an identical sale in DEAR, keeping the same customer and shipping information. If Daily Consolidation is selected, a single daily sale task should be created and use the customer selected in the Integration Settings for store, so that customer, billing, and shipping information imported from LeafLink is ignored.



Loading Pending Orders from LeafLink

[back to top]


To download pending orders manually:

  1. Select the Pending Orders tab.
  2. Click Load Orders.
  3. On the Load Orders from LeafLink window, select a date for the sales transactions to be loaded from the calendar, then click Load from LeafLink.DEAR allows loading historical sales data a maximum of one year old.


Take note of the following when loading pending orders from LeafLink:

  • Any downloaded order is saved to Pending Sales, which is a temporary storage of all sales and payments in DEAR. Only orders matching the defined capture option, with status set to either Accepted, Paid or Completed, are saved.
  • If an order has an entry in Logs, or if it was already downloaded before, it will be skipped. This guarantees that DEAR will not create any duplicate sales from previous transactions.
  • While saving an order, DEAR captures customer information, billing and shipping addresses. All line items are captured together with quantities, prices and totals. Total order discounts are applied as additional charges to the whole order, without distribution by lines to reduce any chances of discrepancy.
  • For each line in a Sale, DEAR attempts to locate the corresponding product by SKU. If no product is found, DEAR attempts to download product info from LeafLink with the same logic as in the Download Products function. The sale line is then saved to Pending Orders with all data from LeafLink, including Tax, Quantity and Total.


Processing Pending Orders

[back to top]


After pending sales orders are reloaded from LeafLink, you should process pending orders to generate sales in DEAR.


To manually process pending orders, click Process on the Pending Order tab. Order download includes download of  all lines, payments, related customer and sales rep. If some differences exist in the order total between DEAR and LeafLink orders, then a manual adjustment is added to DEAR sale to correct this. 


Refunds

[back to top]


Returns and refunds are not yet supported in this integration. 


Order field mapping

[back to top]


DEAR field
LeafLink field
OrderIDNumber
OrderNumberShortId
FinancialStatus , OrderStateStatus
SalesRepresentativeSalesReps[0] (if empty LeafLink - [shopname])
DateCreatedOn
CustomerNoteNotes
CustomerReferenceCustomer.Id
LocationIDfrom General settings. 
ShippingRequiredByDateShipDate
ShippingNotesShippingDetails
Name"Shipping - " + ShippingDetails \ product.Name \ “Discount” \ “Discount X%” \ "Additional amount" (Depends on order line from LeafLink)
QuantityOrderLine.Quantity
PriceShippingCharge \ Calculated price \ Discount amount calculated
TotalPerLineCalculated total price
CommentOrderLine.Notes \ "Manual adjustments"
LineIDOrderLine.Id
TaxCalculated price (0 if non-licensed)
AdditionalDataproduct.Description
TaxRuleIDMapping from incoming tax rule
SKUproduct.Sku


Log

[back to top]


Each captured LeafLink order, once saved to Pending Sales, creates a Log entry to enable tracking of the linked sale in DEAR and in LeafLink. This also helps avoid creating duplicate orders when capturing the same order several times during manual order load.


To view Log entries, select the Log tab.

Take note of the following considerations when it comes to Log entries:

  • They allow you to see which sales task links to a particular LeafLink sale. 
  • You have an option to delete Log entries manually. This will allow you to reprocess an order if required. Deleting log entries will not void or delete sales tasks associated with these entries.


Operations Log

[back to top]


Each time the user or DEAR downloads sales, the appropriate record is added to the operations log, which also contains information about results of downloading, including the count of processed, skipped or cancelled orders.


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.