Home Search

DriveWorks Pro 22
How To: Setup Linked Items

Send Feedback

How To: Setup Linked Items

What is a Linked Item?

Linked Items enable any Custom Item in CPQ to automatically add additional Items to a Quote/Order, removing the need to specify every Item individually using the CPQ catalog.

Linked Items can either be Standard CPQ Items or Custom CPQ Items.

There is no limit to the number of Linked Items that can be added using this process.

Adding Order Items using Linked Items creates a connection between the Items, where the main Custom Item is the parent of all the Items that were automatically added.

Setup

Firstly, make sure all items (whether they are parent Items or future Linked Items) are added to your DriveApp as regular Standard/Custom Items.

Secondly, you need to specify which Standard and Custom CPQ Items should be available to the Parent Custom Item as Linked Items.

This is done by editing the Parent Custom Item from:

Catalog Administration > Items > <CustomItemName>

Using the arrows, move Items from the list box on the left to the one on the right to make them available to your parent Custom Item.

You can search for a specific Item SKU using the 'SKU Search' text box.

Templates

The following templates are required to fully support the use of Linked Items.

  • CPQ Embed Order (Project Template)

    Using this template is only required for Linked Items if you need to customize the 'basket' of your embedded CPQ orders.

    See CPQ Embedded Order for more information.

    If you implemented the CPQ Embed Order Project Template in a version prior to 21.0, you will need to copy your implementation into the new version of the template in order to use Linked Items.

  • CPQ Custom Item Flow (Specification Flow Template)

    This template has a dual purpose and is required by both your Parent Custom Item and any Custom Linked Items you wish to create.

    See CPQ Custom Item Flow for more information.

  • Custom Item Template (Form Template)

    This template has a dual purpose and is required by both your Parent Custom Item and any Linked Custom Items you wish to create. Import the 'CPQ-CustomItem' Form Template into your Custom Item Project in your Form Navigation. Most of the required functionality is included in the template, however some additional functionality must be added to your Project.

    Depending on whether you are going to be using Standard Linked Items, Custom Linked Items, or both, please refer to the relevant sections below.

    See CPQ Custom Item for more information.

    If you implemented the CPQ Custom Item Form Template in a version prior to 21.0, you will need to copy your implementation into a Project containing the new version of the template in order to use Linked Items.

    Alternatively, if you implemented Linked Items in a previous version of DriveWorks, you will need to follow the Steps in this Help File to convert to using the new methods of using Linked Items implemented in DriveWorks 22.

Once you have all the correct functionality in your Project, you will need to follow the steps below to correctly configure your Items as a Parent Linked Item.

Step 1 - Configuring your Parent Item

To enable your Parent Custom Item to create Linked Standard Items, you need to implement the following functionality.

  1. Export to Calculation Table

    Create the following three Export to Calculation Table documents (in Documents-Data) with the following information:

    Document 1

    • Name (of the Export to Calculation Table document): StoreStandardLinkedItem
    • Table (the data will be exported to): LinkedItemsToAdd
    • Fields: Add the following fields to the export document:
      Field NameField TypeIs Captured
      IdNormalYes
      ItemIdControlYes
      LinkedItemIdNormalYes
      PriceIdNormalNo
      PriceNormalNo
      PriceListItemIdNormalNo
      DescriptionNormalNo
      QuantityNormalYes
      DiscountAmountNormalYes
      SpecificationIdNormalNo
      ParentOrderItemIdNormalNo
      OrderItemIdNormalNo

      Add one row to the table and create the following rules for the cells.

      ColumnRule
      IdDWVariableStoreStandardLinkedItemIdExisting
      ItemIdDWVariableStoreStandardLinkedItemItemId
      LinkedItemIdDWVariableStoreStandardLinkedItemLinkedItemId
      QuantityDWVariableStoreStandardLinkedItemQuantity
      DiscountAmountDWVariableStoreStandardLinkedItemDiscountAmount

    Document 2

    • Name (of the Export to Calculation Table document): StoreCustomLinkedItem
    • Table (the data will be exported to): LinkedItemsToAdd
    • Fields: Add the following fields to the export document:
      Field NameField TypeIs Captured
      IdControlYes
      ItemIdNormalYes
      LinkedItemIdNormalYes
      PriceIdNormalNo
      PriceNormalYes
      PriceListItemIdNormalNo
      DescriptionNormalYes
      QuantityNormalYes
      DiscountAmountNormalYes
      SpecificationIdNormalYes
      ParentOrderItemIdNormalNo
      OrderItemIdNormalYes

      Add one row to the table and create the following rules for the cells.

      ColumnRule
      IdDWVariableStoreLinkedCustomItemId
      ItemIdDWVariableStoreLinkedCustomItemItemId
      LinkedItemIdDWVariableStoreLinkedCustomItemLinkedItemId
      PriceDWVariableStoreLinkedCustomItemPrice
      DescriptionDWVariableStoreLinkedCustomItemDescription
      QuantityDWVariableStoreLinkedCustomItemQuantity
      DiscountAmountDWVariableStoreLinkedCustomItemDiscount
      SpecificationIdDWVariableStoreLinkedCustomItemSpecificationId
      OrderItemIdDWVariableStoreLinkedCustomItemOrderItemId

    Document 3

    • Name (of the Export to Calculation Table document): UpdateLinkedOrderItemId
    • Table (the data will be exported to): LinkedItemsToAdd
    • Fields: Add the following fields to the export document:
      Field NameField TypeIs Captured
      IdControlYes
      ItemIdNormalNo
      LinkedItemIdNormalNo
      PriceIdNormalNo
      PriceNormalNo
      PriceListItemIdNormalNo
      DescriptionNormalNo
      QuantityNormalNo
      DiscountAmountNormalNo
      SpecificationIdNormalYes
      ParentOrderItemIdNormalNo
      OrderItemIdNormalYes

      Add one row to the table and create the following rules for the cells.

      ColumnRule
      IdListGetItem(DWCurrentMacroArgument,1)
      SpecificationIdListGetItem(DWCurrentMacroArgument,2)
      OrderItemIdListGetItem(DWCurrentMacroArgument,3)
  2. Specification Properties

    Add a new Specification Property with the following information.

    • Name: LinkedItemDataToAdd
    • Rule: DWVariableCSVLinkedItemsDataToAdd

Step 2 - Custom Linked Items

To enable your Parent Custom Item to create Custom Linked Items, you need to implement the following functionality in each of the Custom Item Projects that will be a Linked Item.

  1. Specification Properties

    Add a new specification Property with the following information.

    • Name: LinkedItemDataToStore
    • Rule: DWVariableLinkedItemDataToStore

Template UI

The Custom Item template creates a new form in your Project called 'LinkedItems'.

This form contains all the controls required to Add, Edit and Delete Linked Order Items.

There are two options when it comes to how these controls are used within your Project:

  • You may include these controls on your existing forms using cut and paste.
  • Alternatively, you may use control override functionality to drive these controls with your existing UI, leaving this new form hidden in the background.

Regardless of the method you choose, these controls are required for any Linked Item functionality to behave correctly. The purpose of each control is explained below:

Linked Item UI

Control NameTypeDescription
LinkedSpecificationHostSpecification HostHosts the Child Specification that is either started or edited.
SelectedItemCombo BoxContains a list of available Linked Item SKUs. The selected SKU specifies which Item is to be added and linked. This control is used for both Standard and Custom Items.
LinkedStandardItemDiscountNumeric Text BoxSpecifies the discount for the SKU to be added to the Order.
LinkedStandardItemQuantitySpin ButtonSpecifies the quantity for the SKU to be added to the Order.
AddLinkedItemMacro ButtonStandard: Adds the SKU/Quantity/Discount to an array of data which specifies the Item which will be added to the Order. This data will be shown in the LinkedItemsToAdd Data table. If a previously added SKU is specified by SelectedStandardItem, this macro button triggers an update to the existing row.
Custom: This Button will launch a new specification of the Custom Item Project in the LinkedSpecificationHost Host Control.
LinkedItemsToAddData TableA Data Table displaying all added Linked Items. This is linked to the LinkedItemsToAdd Calculation Table.
EditCustomLinkedItemMacro ButtonHosts an existing Linked Custom Item Specification based on the SpecificationId field for the selected row in the Data Table LinkedItemsToAdd.
DeleteLinkedItemMacro ButtonDeletes the information for the selected row in the LinkedItemsToAdd Calculation Table. This will ultimately end with the Linked Item being deleted from your quote/order.

Edit and Delete Behavior for Linked Order Items

Edit

Editing an Order Item that is linked to a Parent will instead select and edit that Parent Order Item.

If you need to edit your Linked Order Items, then they should be edited from the Parent Custom Item.

Delete

Linked Order Items cannot be deleted individually from the main Order Items List.

To delete specific Linked Order Items, you must use the delete functionality in your Parent Custom Item Project.

When deleting the Parent Order Item, you can use a CPQ 'Orders' setting (Delete Linked Order Items when Parent Order Item is Deleted) to control what happens to the Linked Order Items:

  • True

    When the Parent is deleted, all its Linked Order Items will also be deleted from the Order.

  • False

    When the Parent is deleted, its Linked Order Items will remain, but the link will be removed. From this point on the remaining Order Items behave normally.