KB Article #183154

How and where to add new Trading engine and custom metadata attributes in B2Bi.

Problem

How and where to add new Trading engine and Custom metadata attributes in B2Bi.

Resolution

Please check /Integrator/solutions/config/b2bx/server/metadata_attributes.cfg

# NOTE:
# Do not change this file.
- If there is a need to add new additional attributes,
- then create a new empty metadata_attributes.cfg file in the directory $B2BI_SHARED_LOCAL/config/b2bx/server,
- create the directory if needed, and add the new attributes using the same syntax as used in this file.

**Configure custom attributes to be used in metadata criteria rules

  1. For optional trading engine attributes only:
    1. From <<span class="mc-variable axway_variables.Product_Short_Name variable">B2Bi</span>_installation_directory>/Integrator/solutions/config/b2bx/b2bxgi, copy the b2bxgi_attributes.txt file to $B2BI_SHARED_LOCAL/config/b2bx/b2bxgi.
    2. Enable the attribute that should be sent from the trading engine to the integration engine by setting the value to 1.
    3. Example: Direction = 1
    4. Restart B2Bi.
  2. In the $B2BI_SHARED_LOCAL/config/b2bx/ folder, create a folder named server.
  3. In $B2BI_SHARED_LOCAL/config/b2bx/server, add a file named metadata_attributes.cfg.
  4. Add the custom attributes to $B2BI_SHARED_LOCAL/config/b2bx/server/metadata_attributes.cfg, with the following structure:
    • For custom metadata attributes:
    • Message Attribute: CustomAttribute1=string
    • For optional trading engine attributes:
    • Trading Engine: TradingEngineAttribute=string