Adding and Managing Part Filters

Overview

Any field, including custom part fields, can be used as filter attributes. Part filters allow you to control access rights to the parts. In order to create a parts filter, you will need to identify parts with certain custom values and then create permissions to view each classification.

Filtering happens when a user enters Oracle CPQ and a filter has been created to show that person a specific set of parts.

Filtering parts only affects the parts seen by an end user, not an admin using Administration pages.

Example: Create a custom part field called Brand. You want to filter parts so that users in the United States can only see parts that are Brand1 while users in Europe can only see parts that are Brand2. All users can see parts without a brand. Create filter rules based on this new custom part field. The filter can be based on username, company name, user type, company type, user groups, and Customer ID.

Administration

ClosedCreating a Parts Filter

  1. ClosedNavigate to the Part Defined Fields page.

    1. Click Admin to go to the Admin Home Page.
    2. Click Parts in the Products section.

      The Parts Search for Admin page opens.

    3. Click Customize Part Fields.

      The Part Defined Fields page opens.

  2. Create a custom part field, if necessary.

    For more information, see the topic Custom Part Fields.

  3. In the Part Defined Fields section, choose an existing custom part field or your newly-created custom part field and set the Filter/Normal drop-down value to Filter.
  4. Click Update to save your changes.
  5. In the Advanced Scripts column, click Define Script next to the custom part field you chose.

    The BML Editor page opens.

    You may need to click off of your custom part field's row before the Define Script button appears.
  6. Write a BML script to define the filter.

    The return for a parts filter is a list of allowed values, separated by commas.

    For more information, see the topic What is BML.

    The following attributes are available as inputs to the filter: 

    Attribute Name Variable Name Data Type Description
    User Login Name _username String

    Restrict or allow access to parts by selecting a specific user login to add to your filter script.

    For example, if (_username = "joesmith") { return ""};

    Company Login Name _company String

    Restrict or allow access to parts by selecting a company name to add to your filter script.

    For example, if (_username = "joesmith" and _company = "CPQ") { return ""};

    User Type _user_type String

    Restrict or allow access to parts by selecting a user type to add to your filter script: RestrictedAccess, FullAccess, QuickRegistrationBuy, ChannelAgent, SalesAgent and/or BuyAccess.

    For example, if (_username = "joesmith" and _company = "CPQ" and _user_type = "ChannelAgent") { return "" };

    Company Type _company_type String

    Restrict or allow access to parts by selecting a company type to add to your script: RestrictedAccess, FullAccessWithESales, BuyAccess, and/or QuickRegistrationBuy.

    For example, if (_username = "joesmith" and _company_type = "FullAccessWithESales") { return ""};

    User Groups _user_groups String

    Restrict or allow access to parts by selecting a user group to add to your filter script.

    For example, if (_user_groups = "Girl Scouts) { return Acme Parts; } return "";

    Customer ID _customer_id String Restring or allow access to parts by selecting a Customer ID.
  7. Click Check and Save.
  8. Click Deploy to activate the custom parts fields and filters.

Example:

The following example script shows how parts filtering can work: 

//Logic: Filter parts based on company's user type
//Field returned: String
if (_company_type=="BuyAccess" and _user_type=="FullAccess"){return ""};
return "Acme Parts, Generic Parts";
This script example could be used to filter parts based on company type and user type. FullAccess users in the BuyAccess company type see all classifications of parts because all menu values are returned with the double quotes. Any other user type sees parts classified as "Acme Parts" or "Generic Parts".

ClosedRemoving Filters

You can remove a filter from a defined field in one of two ways.

  1. Choose the field whose filter you want to remove, and do either of the following:
    • To shut off the filter: Select Normal under the Filter/Normal column. Click Update to save your changes and return to the previous page..
    • To delete the filter: Select the Delete checkbox. Click Update to save your changes and return to the previous page.
  2. Click Deploy to activate filter changes.

Use Cases

ClosedInactivating Parts

You need to mark some parts as inactive and remove them from use, but without removing them from the parts database.

  1. Add a new single-select menu field using the steps under "Creating a Parts Filter".
  2. Create a required field with the options: Active and Inactive.

    Set the appropriate default value for your case.

  3. Write return "active" in the filter script. The new field will be blank for all existing parts. You must set it to the desired value for all existing parts.

Notes

Notes:

  • Parts filtering happens automatically when a user enters the system and a filter exists for that user.

  • Only part numbers associated with the current price book are accessible to the sale users. CPQ has two types of price books: use multiplier or not:

    • A regular price book does not use multipliers, and any part number that is not explicitly defined in the price book is not associated with the price book.

    • A price book that uses multiples implicitly contains all part numbers, and a part number not explicitly defined in the price book is still implicitly associated with the price book and priced using the part number base price multiplied by the multiplier. You can use the part filter to limit access to these part numbers.

Related Topics

Related Topics Link IconSee Also