Integration

A Lot entity in SellStack matches and is created from the Lot entity in Dynamics 365. Lot numbers in Dynamics 365 can be viewed and created by going to Item -> Related -> Lot numbers (see Item Card in Dynamics 365 image and Item Card (related menu) in Dynamics 365 image). This opens a list of Lot numbers for a given product (see Lot list in Dynamics 365 image). From there, you can create new Lots or view existing ones.

Lot list in Dynamics 365

Lot list in Dynamics 365

To create a new Lot in Dynamics 365, open Lot No. Information Card (see Lot No. Information Card (general info) in Dynamics 365 image). Assign the lot to one of the existing items in the Item No field. Set Lot No. to some unique value. Additionally, Lot needs to be assigned to a location to be created or updated in SellStack. There are a lot of additional fields that can be set in Dynamics 365 and synchronized into SellStack. All of these additional fields will be stored as Lot attributes in SellStack. Some of these attributes are the following:

  • Description

  • Active for Web Order flag

  • Strain description (extracted from Strain Code)

  • THC (%)

  • CBD (%)

  • Total Cannabinoids (%)

  • Expiration Date

  • Location code

  • Harvest Date

  • Manufacture Date

  • Quantity on Hand

  • Reserved quantity (not displayed on the pictures)

These attributes are most often used in SellStack (for filtering or lot allocation) and are highlighted in the pictures below. There are a lot of other attributes not mentioned, but they are rarely used.

Lot No. Information Card (general info) in Dynamics 365

Lot No. Information Card (general info) in Dynamics 365

Lot No. Information Card (inventory info) in Dynamics 365

Lot No. Information Card (inventory info) in Dynamics 365

Dynamics users often mistake THC and CBD input fields when entering values. Values need to be set in Level fields and not in (%) fields to be imported into SellStack. Check Lot No. Information Card (percentage attributes) in Dynamics 365 image for an example of the correct setup.

Lot No. Information Card (percentage attributes) in Dynamics 365

Lot No. Information Card (percentage attributes) in Dynamics 365

The state in which Lot numbers are created in SellStack is controlled by the global lotAutoEnable environment variable. If this flag is set to false, all Lot numbers are created as disabled. If the flag is set to true, all Lot numbers are enabled when created. Once the Lot number is created, and if it is disabled, it can be enabled only manually through SellStack Admin. Please contact SellStack’s support team if you need to change the global setup of enabling lot numbers. While the enabling of Lot numbers is configurable, disabling depends on the imported values. A lot number is disabled if its Active for Web Order is false. To summarize, these are the rules of lot activation in SellStack:

  • When the lotAutoEnable parameter is false, enable the Lot manually

  • When the lotAutoEnable parameter is true, all Lot numbers will initially be created as enabled

  • When the lotAutoEnabled parameter is true and the Lot number is already created, enable the Lot manually

These are the rules for lot deactivation in SellStack:

  • If Active for Web Order is set to false in Dynamics 365, the Lot number will be disabled automatically

  • Disable the Lot number manually and independently of Dynamics 365 in SellStack Admin

The enabled flag is crucial for Lot visibility and the product’s inventory. Disabled Lot numbers cannot be displayed on the product detail page, and they cannot be purchased. Moreover, when calculating a product’s inventory, only enabled Lot numbers are considered in aggregation. Check the Inventory chapter for more information about Lot inventory calculation. After completing the Lot setup in Dynamics 365 by following the instructions above, a new Lot will appear shortly in SellStack. It can be found within the associated product, as shown earlier or in the Lot numbers grid (one of the options in the Admin Catalog). There, you can filter the Lot numbers by their identifier (see Lot numbers grid in SellStack Admin image). Clicking the Details button redirects you to the Lot number page (see Lot number page in SellStack Admin image). The SellStack model assumes a many-to-many relationship between Lot numbers and products, although in most cases, a Lot number belongs to only one product. In situations where a Lot number is associated with multiple products, multiple records will be listed on the Lot number page. The entity that connects a Lot number and a product is called a Lot Variant. However, for simplicity - and because a Lot number typically belongs to a single product (other cases have not been observed) - we refer to Lot Variants as Lot numbers throughout this documentation. Clicking the Edit button redirects you to the Lot (Variant) editing form (see Lot editing form (general information section) in SellStack Admin image). Compare the general information and attribute data with Dynamics 365 to verify that all data has synced correctly. You can also enable or disable the Lot number manually from this page if needed.

Lot numbers grid in SellStack Admin

Lot numbers grid in SellStack Admin

Lot number page in SellStack Admin

Lot number page in SellStack Admin

Lot editing form (general information section) in SellStack Admin

Lot editing form (general information section) in SellStack Admin

Last updated