Bundles
Bundles allow you to combine multiple items into one sales package. They can be defined in the item master data as well as created on-the-fly in most sales documents. A Bundle behaves like a product/item that consists of different components. Bundles unfold their full potential for a clear structuring of sales documents in combination with Formatting which is also part of DYCE Easy Bundle Seller.
Multi-level and nested Bundles are not possible.
Product bundle
A bundle is a combination of individual components into a standalone product. It can be used in Sales Quotes and Sales Orders (from here on called sales documents). The price of the bundle is based on the prices of the components. Bundles can be used based on master data or created individually (on-the-fly).
Master data for bundles
To use fixed bundles, they can be created in the master data of the items. This allows easy use e.g. in a sales offer. For this purpose, a new item is created to be used for a product bundle. The description of the bundle is entered in the item's description. The Bundle field (on the Item card in the General fast tab) is set to YES.
The item representing the bundle must be set as inventory managed (Type=Inventory). This is Business Central's requirement for an assembly bill of materials to be created. However, this is not further relevant to the use of the item, as the item will be converted to a text line when used in a sales document.
Subsequently, the components for the bundle are stored via the Assembly BOM (call via Related / Bill of Materials / Assembly). The moment a Bundle item is used in a sales line and a quantity is entered, the related BOM is automatically unfolded. In this process, the line with the Bundle item is converted to a text line (field Grouping=Bundle), and the entries in the BOM become components. The system also takes into account settings from Sales & Receivables Setup.
If the rollout of a Bundle is interrupted by a dialog, request page or other popups, it is possible that the Bundle will not be rolled out completely. The Bundle is then potentially only rolled out up to the point of interruption. During the interruption, some information must be saved in the database (commit). When saving, however, the instruction to create further Sales lines and mark them as components gets lost.
For more details on how assembly BOMs work, please see this part of the Microsoft documentation.
Only items for professional service whose Service Billing Type is Budget can be used as components of a Bundle. The background to this is that Bundles can only be shipped and invoiced as a whole. Neither is possible with the Service Billing Types Time & Material and Fixed Price.
Create Bundles via other Apps or Api
Bundle items that are entered in Sales lines via other apps or an API are not automatically exploded, if setHideValidateDialog(true) or GUIALLOWED(false) applies. This prevents the Sales line from being changed by DYCE Easy Bundle Seller before the other app has finished creating it. For example, if the Shopify Connector were to enter a Bundle item in a Sales line and set the quantity, the Bundle would be immediately explode. The Sales line with the Bundle is now a comment/text line. The Shopify Connector can no longer enter the price and runs into an error.
If the quantity is entered in a Bundle when neither setHideValidateDialog(true) nor GUIALLOWED(false) does apply, the Bundle is exploded immediately. For the user, the Bundle is always going to exploded automatically, while for other apps or an API it will not.
Bundle items are prevented from being posted in order to prevent incorrect data. The user can explode the Bundle via the line action Explode Bundle. The action is available in Sales Quotes, Sales Orders, Blanket Sales Orders, Sales Invoices and Sales Credit Memos.
Additionally, an action has been made public in DYCE Easy Bundle Seller to explode Bundles automatically again. This can be used to create a connector app.
In the Codeunit 70921400 DYCEEBSBundleManagement the procedure "ExplodeBundleLinesInSalesDocument(SalesHeader: Record "Sales Header") " can be called by a connector app. The action explodes all Bundles in the selected document.
For example, to connect the Shopify Connector, the event "Order.Events.OnAfterProcessSalesDocuments(SalesHeader,OrderHeader) " in Codeunit 30166 "Shpfy Process Order" (ShpfyPreocessOrder.Codeunit.al) could be utilized to explode all Bundles in the document.
Creating a custom bundle
In addition to using a predefined bundle (see above), an individual or one-time bundle can also be created manually within a sales process. For this, a line of the type Comment (text line) must be created in the first step. In the text line, the description is entered and the indicator in the Grouping field is changed to Bundle. The Bundle is initially created with quantity 1.
In the following lines the components (items) are entered. These lines are marked as Components in the Grouping field. In the component lines, the quantities are entered that result in exactly one Bundle.
Afterwards, the bundle can be edited in the Bundle page. The page is called up via the function Edit Bundle in the line menu (Manage in the sales document). Here, Unit of Measure as well as Quantity, Discount and the Unit Price of the bundle can be edited. In the sales documents, increasing the quantity in the bundle will correspondingly increase all quantities in the components.
Defaults for custom bundles
To facilitate the creation of a bundle on-the-fly, defaults can be stored via the Bundle Unit of Measure, Bundle Line Format Style and Bundle Print Components fields in the Sales & Receivables Setup page in the Bundle fast tab. These entries are optional. If these fields are not filled, they must be assigned when creating an individual Bundle.
If you want to quickly go to the page for Bundle, you can get the Bundle Description field via personalization. Clicking on the field will open the Bundle page.
If a sales document contains multiple bundles, a selection window for assigning the component to the desired bundle is displayed when components are entered. The bundle that is next above the component is always suggested (highlighted). By confirming the selection, the component is assigned to the bundle.
Prices and discounts in the Bundle
Unit price, amount and discount amount of a bundle are calculated based on the components. The unit price of a bundle (Unit Price Excl. VAT or bundle price) is calculated by dividing the sum of the amounts and discount amounts of the components by the bundle quantity:
The line amount of a bundle (Line Amount Excl. VAT or bundle amount) is equal to the sum of the component amounts:
The discount of a bundle (Line Discount Amount or bundle discount) is equal to the sum of the discount amounts of the components:
If a component is added or removed from a bundle or the price of the component is changed, the bundle's price, amount, and discount are recalculated. If the quantity of a component is changed, the bundle's amount and discount will be recalculated. If a discount is entered, changed or deleted in a component, the amount and discount in the bundle will be recalculated.
Service Commitment Items are not included in the bundle price, amount and discount calculation. Changes in components will immediately result in a change in the bundle. This includes quantity-based component price changes caused by quantity changes in the bundle.
The quantity, price, discount and amount of the bundle can be changed using the Edit Bundle line action. A quantity change in the bundle will change the quantities of the components. Bundle amount and discount will be recalculated. If the quantity of a component is changed, the price is also recalculated, provided that there are entries in a Sales Price list.
In case of a price change in a bundle, the prices of all components are recalculated. In this case, the prices of the components are changed by the same proportion as the bundle price was changed. If after the price change of the components the newly calculated bundle price does not match the manually entered bundle price, the difference is calculated down to one bundle (quantity = 1) and added to the price of one component. For this second step, the optimal component is determined. If a component and the bundle have the same quantity, the component is optimal and used to make up the difference. If there is more than one component with the same quantity, the last one is used. If there is no component with the same quantity, the last component is used.