This blog post will show you the way to enable and use product search by attributes in POS (ePOS).


AX configuration

Configuration of product attributes in AX include two main steps:

  1. Configure attribute groups, attributes and attribute values for hierarchies, categories and products.
    Very nice explanation is here: Organic AX: Product attributes
  2. Mark all attributes should be used for search as ‘Can be refined’ (we will use new ‘Brand’ attribute as a sample).      

    Refinable product attributes
  3. Assign product attributes to stores.
    Technet article can be helpful:Store product attributes
  4. Run 1040, 1050 and 1070 jobs to update store databases.

POS changes

I did not find any standard way to run search by attributes in POS. But we can enable such search by a small coding.

The main limitations of search by attributes are:

  1. It can be executed only within a SINGLE product category. This makes impossible to search across different category hierarchies
  2. It is performed only in local store database; call HQ (AX) is not possible.
  1. Add new ‘Blank operation’ for POS. Code for operation is shown below
    
    public void BlankOperation(IBlankOperationInfo operationInfo, IPosTransaction posTransaction)
    {
       switch (operationInfo.OperationId.ToUpperInvariant())
       {
          case "TST_ITEMSEARCHCATEGORY": 
                  this.Application.RunOperation(PosisOperations.ItemSearch, 
                                                             operationInfo.Parameter);
    	      operationInfo.OperationHandled = true;
    	      break;
        }
    }
    

    This blank operation runs standard ‘Item search’ operation, but with a parameter. The parameter should contain Rec ID of product category.

    Rec ID for category

  2. Add new button to POS layout:

    Blank operation button


Results

  1. When POS starts item search with not empty category, it will show Search by attributes buttons:

    Product search with attributes

  2. When you click on magic glass, the list of product attributes configured as Can be refined for current store will be shown.
    You can specify search values for multiple attributes, they will be applied as AND logical condition.

    Select attribute values

  3. Search shows found products:

    Found items by brand attribute

  4. If you click on Product details button,the list of attribute values will be shown.

    Product details with attribute values

  5. Minimum number of search chars to enter is two (2). When you try to enter a single character, you will receive the error: Search requires a minimum of two characters.

    Search requires 2 chars

  6. Search by date attributes is disable by default: AX does not allow marking date attributes as ‘Refinable’. However, if to change AX code a bit, search by date attributes will be possible.

    Search by date attributes

Hope this post will be helpful :) Thanks for reading!