Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.
This article explains how to manage custom attributes in webmethods.io B2B.
For e.g.: Purchase order number from document
For e.g : User created any XML document type and wants to have separate attribute for retrieving some additional content from the document.
In this article, we are going to add custom attributes such as State or zip code to attribute list in webmethods.io B2B from the below XML sample. (apart from system attributes)
Here is the purchase order XML sample.
<?xml version="1.0"?> <PurchaseOrder PurchaseOrderNumber="1" OrderDate="2020/04/22"> <Metadata> <Sender>ABC</Sender> <Receiver>ACME</Receiver> </Metadata> <Address Type="shipping"> <Name>ABC Corporation</Name> <Street>ABC Street</Street> <City>ABC City</City> <State>ABC Street</State> <Zip>560037</Zip> <Country>ABC</Country> </Address> <DeliveryNotes>Office</DeliveryNotes> <Items> <Item PartNumber="1"> <ProductName>ACME</ProductName> <Quantity>10</Quantity> <USPrice>1000</USPrice> <Comment>ACME</Comment> <ShipDate>2020/04/22</ShipDate> </Item> </Items> </PurchaseOrder>
Navigate to imported document i.e. purchaseorder, click on Document attributes -> Add Document Attribute
Navigate back to XML document -> Attributes, click on attribute State and you should see XPath expression changes accordingly.
Click on AddToAttributes and select the State from Attribute dropdown- > Update.
Upon Successful sending XML message to B2B cloud, you should see the custom attribute in the transaction page.