Custom Asset Fields

Overview

Administrators can extend the asset table by adding custom asset fields that suit their company's business needs.

Beginning in Oracle CPQ 22C, the available count of Custom Asset Fields is 600. This field count includes:

ClosedAsset Fields

By clicking Assets on the Admin Home page, administrators can view custom asset fields.

This page contains a list of the custom asset fields and the count of available fields.

  • The remaining Available Fields count is displayed at the top of the page.
  • Asset fields displayed in red indicate an un-deployed fields After successful deployment, the fields are no longer displayed in red.
  • Administrators can check the Delete checkbox to select one or more custom asset fields to delete.
  • Administrators can click Add to create new custom asset fields.

Customer Asset Fields

Administrators can select a link in the Field Name column to open the corresponding field editor and modify the associated field properties.

Upon deploying the custom asset field, the field name displays in UI Designer under the list of attributes. Administrators can then add the new or updated custom asset fields to the Subscription Workbench.


Administration

ClosedAdd Custom Asset Fields

Complete the following steps to add a custom asset field.

Notes:

  • Prior to Oracle CPQ 22D, custom asset field variable names had a "_asset_custom_" prefix.
  • Beginning in Oracle CPQ 22D, a "_c" suffix will be appended to the variable name provided by the administrator.
  1. Navigate to the Admin Home page.
  2. Click Assets in the Products section.
  3. Click Add.

  4. Enter the Field Name and Variable Name.

    A "_c" suffix will be appended to the variable name.

    String Field Editor

  5. Select the desired Data Type.

  6. Click Add.

    After you click Add, String, Integer, and Date field types are automatically added to the Asset Defined Fields list.

  7. For Single Select Menu or Float field types, complete the applicable steps below:

    ClosedSingle Select Menu

    1. Enter the Menu Entry Displayed Text and Variable Name, and then click Add Entry.

      • Repeat this step for all desired menu options.
      • To Change the Order of menu entries, select a menu entry and use the up and down arrows to move the selected entry.
      • To Delete a menu entry, select the menu entry, and then click Delete.
    2. Click Add.

    Single Select Menu Field Edtor


    ClosedFloat

    1. Check the Currency box currency type fields.

      Currency fields are displayed as floating point number fields that will display the number in currency format. The currency displayed is the user's currency.

    2. Select the Precision value (the number of decimal places that will be accepted in the asset field).
    3. Click Add.

    Float Field Editor


ClosedDelete Custom Asset Fields

Notes:

  • Administrators cannot delete custom asset fields that are referenced in a UI Designer layout. If administrators attempt to delete a deployed custom asset field used in a layout, an error message will display. Administrators cannot delete the field until after the custom asset attribute is removed from the UI layout.

Complete the following steps to delete a custom asset field:

  1. Navigate to the Admin Home page.
  2. Under Products, click Assets.
  3. Under Asset Defined Fields, select the custom asset fields you want to delete.
  4. Click Delete.

    The custom asset field no longer displays in the Asset Defined Fields section.


ClosedDeploy Custom Asset Fields

By deploying one or more custom asset fields, administrators are adding the fields to the list of UI Designer attributes. Administrators can then use UI Designer to add deployed, re-deployed, and updated custom asset fields to the Subscription Workbench layout.

Notes:

  • After the successful deployment of a custom asset field, the field no longer displays in red under Asset Defined Fields.
  • Deployed custom asset fields are available for asset REST services.
  • The following deployed custom asset field types are available in the Subscription Workbench layout: String, Single Select Menu, Float, Integer, and Date.

Complete the following steps:

  1. Navigate to the Admin Home page.
  2. Under Products, click Assets.

    Under the Asset Defined Fields section, all newly created or modified custom asset fields display in red.

    Note: Administrators do not need to select the custom fields to deploy. Upon clicking Deploy, all custom fields displayed in red are deployed.

    Asset Defined Fields, created/modified asset in red (undeployed)

  1. Click Deploy.

    The deployed custom asset fields remain in the Asset Defined Fields section, but no longer display in red.

    Asset Defined Fields, deployed assets

As shown below, the deployed custom asset field displays among the list of attributes in UI Designer.

Deployed custom asset attribute displays among the list of attributes in UI Designer


ClosedAdd Custom Asset Fields to the Customer Assets Layout

After deploying a custom asset field, the field displays in the list of UI Designer attributes. Administrators can use the standard UI Designer drag and drop functionality to add the custom asset field in the Subscription Workbench layout. When referenced in a layout, custom asset fields display as read-only fields.

Customer Assets List Layout with Custom Asset Attribute as Field

Customer Assets List Layout with Custom Asset Attribute as Field

Notes:

  • Beginning in Oracle CPQ 22D, CPQ will adopt Oracle Sales naming conventions for asset custom field variable names. When administrators create new asset custom fields, a "_c" suffix will be appended to the variable name. This update only effects new custom fields for assets. There is no change to existing asset custom fields.
  • New and updated custom asset fields are visible in UI Designer after the custom asset fields are deployed.
  • Administrators can add updated and re-deployed custom asset fields to the Subscription Workbench page layout.
  • To update a field name in UI Designer, administrators must use UI Designer to remove the attribute from the layout, update the custom asset field, deploy the changes, and then add the attribute back to the layout.

ClosedPreserve New Transaction Line Attribute Values in Assets

Complete the following steps to preserve new transaction line attribute values in assets.

  1. Navigate to Admin > Products > Assets.
  2. Add a new custom attribute for assets, and then deploy the changes.
    For additional information, refer to Asset REST APIs.

    This new custom asset attribute can be used to store the value of the new transaction line attribute in an asset.

  3. Navigate to: Admin > BML Library > ORCL_ABO folder.
  4. Perform one of the following options for the abo_getOpenOrderBoms function:
    1. If the function hasn't been previously overridden, click on the Create link under the Override Column.
    2. If the function has already been overridden, click on Edit.
  5. Search for the "lineField" array and add a new array with the variable name of the new transaction line attribute.
  6. Save the "abo_getOpenOrderBoms" library function.
  7. Select the applicable option below and complete the associated steps:

Complete the following steps for ABO Packages 18D and Later

  1. Navigate to: Admin > BML Library > ORCL_ABO and perform one of the following options for the abo_initializeContext function:
    1. If the function hasn't been previously overridden, click on the Create link under the Override Column.
    2. If the function has already been overridden, click on Edit.
  2. Add the variable name of the new custom asset attribute to the "assetInfo.fieldQueryList" property.
  3. Add the variable name of the new transaction line attribute to "extraLineFieldForAsset" property.
  4. Navigate to: Admin > BML Library > ORCL_ABO.
  5. Perform one of the following options for the abo_convertDeltaBomtoAsset or abo_convertDeltaBomItemToAssetItem_ext function:
    1. If the function hasn't been previously overridden, click on the Create link under the Override Column.
    2. If the function has already been overridden, click on Edit.
  6. Include the logic to copy from transaction line to asset. Refer to how displayKey in assetPayload is populated from itemInstanceName_l in fieldJson and add similar changes to store the new transaction attribute value in the new asset custom attribute.

    For example - Assuming new transaction line item attribute is a text attribute, the following lines will copy the new transaction line item attribute value to the new custom asset attribute.

    transAttrValue = jsonget(oneNode, NEW_TRANSACTION_ATTR_VARIABLE_NAME , "string", ""); if (transAttrValue <> "") { jsonput(assetPayLoad, NEW_ASSET_CUSTOM_ATTR_VARIABLE_NAME, transAttrValue); }

    NEW_TRANSACTION_ATTR_VARIABLE_NAME and NEW_ASSET_CUSTOM_ATTR_VARIABLE_NAME are referring to constants that should be declared in the constant declaration section for the new transaction attribute variable name and new asset custom attribute variable name respectively.

  7. Save the "abo_convertDeltaBomtoAsset" or "abo_convertDeltaBomItemToAssetItem_ext" library function.
  8. Perform one of the following options for the abo_loadAsset function:
    1. If the function hasn't been previously overridden, click on the Create link under the Override Column.
    2. If the function has already been overridden, click on Edit.
  9. Locate the loop to convert asset to BOM.

    Copy the field value from the new asset custom attribute to the corresponding transaction line attribute within the "fields" JSON. Refer to sample code where displayKey field from oneAssetNode is copied to itemInstanceName_l in existing code.

  10. Save the "abo_loadAsset" library function.

Complete the following steps for ABO Packages 18C and Earlier

  1. Navigate to: Admin > BML Library > ORCL_ABO and perform one of the following options for the abo_initializeContext function:
    1. If the function hasn't been previously overridden, click on the Create link under the Override Column.
    2. If the function has already been overridden, click on Edit.
  2. Locate the block to initialize "extraLineFieldsforAsset" JSON field (around line# 98 to 103).
  3. Add the variable name of the new transaction line attribute in the "fieldList" along with the other attributes.
  4. Save the "abo_initializeContext" library function.
  5. Perform one of the following options for the abo_convertDeltaBomtoAsset function:
    1. If the function hasn't been previously overridden, click on the Create link under the Override Column.
    2. If the function has already been overridden, click on Edit.
  6. Add logic to copy transaction line attribute value from BOM fields (fieldJson) to assetPayLoad JSON.

    Refer to how displayKey in assetPayload is populated from itemInstanceName_l in fieldJson and do similar changes to store the new transaction attribute value in the new asset custom attribute.

  7. Save the "abo_convertDeltaBomtoAsset" library function.
  8. Perform one of the following options for the abo_loadAsset function:
    1. If the function hasn't been previously overridden, click on the Create link under the Override Column.
    2. If the function has already been overridden, click on Edit.
  9. Locate the fieldArr declaration (around line# 18).
  10. In the loop to convert asset to BOM, copy the field value from the new asset custom attribute to the corresponding transaction line attribute within the "fields" JSON.

    Note: This will have to be done for both root and descendant assets.
    Refer to how assetKey has been defined for both root and descendant assets.

  11. Save the "abo_loadAsset" library function.

Related Topics

Related Topics Link IconRelated Topics