Adding custom attributes by process type

You can add custom attributes in the statement builder based on the process types such as order fulfillment, outbound shipment, and so forth. This customization is useful when you want to evaluate a condition based on an attribute that is not provided as a pre-defined set in the condition builder. These custom attributes are added in the condition builder when you create a condition.

About this task

The custom attributes can be added by creating a custom XML file.


  1. Create a directory named extensions in <runtime_sandbox>/extensions/global/template/configapi directory.
  2. Create a file named extn_conditionbuilder.xml in the <runtime_sandbox>/extensions/global/template/configapi directory. The format of a sample XML file is given in the following example.
    Note: To customize condition builders for order hold types, create a file called holdtype_extn_conditionbuilder.xml and follow the procedure outlined in this section.
    Note: You must restart your application server every time you add conditions in the extn_conditionbuilder.xml file for the changes to appear in the Applications Manager screen.

    The sample file creates conditions for extended order number, shipping information, and order details. The extended order details have further sub-elements such as CustomItemId and ExtnOrderType.

    The Id attribute must be identical to the element name. For example, the element ExtnOrderNo must contain the attribute Id="ExtnOrderNo".

       <ProcessType Name="ORDER_FULFILLMENT"> 
           <ExtnOrderNo Id="ExtnOrderNo" DisplayName="Extended Order Number" 
            DataType="Text-40" Type="Leaf"/> 
           <ExtnShiptoId Id="ExtnShiptoId" DisplayName="Extended Ship To Id" 
            DataType="Text-40" Type="Leaf"/> 
           <CustomOrderDetails Id="CustomOrderDetails" 
            DisplayName="Custom Order Details"> 
               <CustomItemId Id="CustomItemId" DisplayName="Custom Item Id" 
                 DataType="Text-100" Type="Leaf"/> 
               <ExtnOrderType Id="ExtnOrderType" DisplayName="Extended Order Type" 
                DataType="Text-100" Type="Leaf"/> 





    Required. Specify the name of the Process type where you are creating the condition.



    Required. Specify the display name for this attribute in the condition builder screen.


    Required. Specify the data type needed for this attribute. For example, the pre-defined attribute BillToId has a data type of "ID-40".

    The data type can be any one of the types provided in the <runtime_sandbox>/repository/datatypes/datatypes.xml file.


    Required. Specify the ID you want this condition to be associated. By default this is same as the element name.


    Required. Specify the type of this attribute. For example "Leaf" type identifies the attribute as part of a menu item.

    If it is not specified, the attribute is considered to be a menu header leading to a sub menu. In the example the element CustomOrderDetails does not have a type defined, since it has leading sub-menus such as CustomItemId and ExtnOrderType.

  3. The elements like ExtnOrderNo, ExtnShipToId, etc., as shown in the example, are used to define the conditions when it is saved in the database. Therefore, the element name must be unique for a single process type.
  4. This XML file content is merged with the pre-defined static attributes by process type and displayed on the screen as shown below:
    A screen shot of Condition Builder Extended Attributes
  5. Click OK in the statement builder window to show the display name of the XML file in the condition detail window.
  6. The display names are replaced with their element names once the condition is saved. These element names, along with their conditions, are referred to as the condition value in the database table YFS_CONDITION.
  7. Custom attributes are shown in the similar way as the current static attributes in the condition builder.

    Custom attributes defined in this manner can be used as part of the service definition framework or in pipeline definitions for creating events or conditions. However, if used in pipeline definitions, the condition evaluator does not evaluate these custom attributes.

    Note: Custom attributes cannot be used to evaluate conditions in pipeline determination rules.