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 Pictures 24 and 30). This opens a list of Lot numbers for a given product (see Picture 48). From there, you can create new Lots or view existing ones.
Picture 48. Lot list in Dynamics 365
To create a new Lot in Dynamics 365, open Lot No. Information Card (see Picture 49). 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 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.
Picture 49. Lot No. Information Card (general info) in Dynamics 365
Picture 50. 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 Picture 51 for an example of the correct setup.
Picture 51. 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 iTristan’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 Picture 52). Clicking the Details button redirects you to the Lot number page (see Picture 53). 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 Picture 54). 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.
Picture 52. Lot numbers grid in SellStack Admin
Picture 53. Lot number page in SellStack Admin
Picture 54. Lot editing form (general information section) in SellStack Admin