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 configure extended criteria based on the extracted attribute values in webmethods.io B2B.
In this article we are going to use the custom attributes in extended criteria section.
In this article we are going to add extended criteria by using the two different State Values and trigger rules accordingly based on the criteria.
<?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>Atlanta</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 Processing Rules -> Create two Rules say ‘AtlantaRule’ and ‘MichiganRule’. Click on ‘AtlantaRule’ and then click Extended criteria in the left side panel.
In the next page click on Add Extended Criteria and provide the attribute name, operator and Value.
In this case we are going to use the following values in extended criteria section, click update.
Attribute: State
Operator: Equals
Value: Atlanta
If the above criteria matches in the action invoke an integration specific to Atlanta state.
Similarly update the Rule ‘MichiganRule’ with the below extended criteria and integration specific to the state.
Value: Michigan
Testing from Postman requires below features to be turned-off on the channel.
In the body section, provide the state value as Atlanta as below.
Upon sending the message over postman you should see rule related to Atlanta will get fired and which will invoke the Atlanta integration.
You should see Rule (AtlantaRule) get fired successfully.
Send the XML message again by updating the status field in the body as Michigan. Observe that rule specific to Michigan state will get executed successfully.