B2B as a Service: Connect a Partner via webMethods.io B2B

Introduction

As more and more system and platform are moving to the cloud, so is B2B (Business to Business). With webmethods.io B2B we offer our proven B2B platform as a Service in the cloud, providing capabilities like Partner Management and Onboarding, Document Definition, powerful processing rules and End to End Monitoring. webmethods.io B2B comes with complete sets of predefined documents for standard like EDI and RosettaNet, but you can also define your own document types.
In this article I will show you the complete process you need to do to receive documents from a trading partner, which consists of

  • Creating a Channel
  • Setting up the Trading Partners
  • Creating the Document
  • Defining the Rule (Part 1)
  • Test sending a document

All of the pictures are click to enlarge, so if you want to read the details in the screenshots, just click the thumbnails. There is also a video on our youtube channel showing the complete procedure: B2B as a Service: Connect a Partner via webMethods.io B2B - YouTube.

If you want to create this demo yourself, you need a webMethods.io tenant with B2B enabled.

Create a Channel

Go to webMethods.io B2B

Go to Communications - Channels and click Add Channel

Select HTTP-IN and give the channel a name. Click Finish.

Make sure to enable the channel. Copy the Endpoint URL for later use. We will use this endpoint to post our message lateron.

Setup the Trading Partners

A big part of B2B is managing the trading partners involved in transactions, internally as well as externally. We will setup 2 trading partners for our demo and create and associate an user for the partner sending us a transaction.
Go to Partner - Partner Profiles

Click Add Partner.

Enter a name and click Add Identity

Select an Identity type (we just use DUNS here) and enter a value for the identity value. Click Add.

Click Save.

Make sure to enable the Partner Profile.

Add a second profile for the receiving trading partner.

Make sure to enable this Partner Profile as well.

Go to Partner - Partner Users. Click Add Partner User.

Enter User Name, Full Name and set the Password.

Go back to Partner Profiles and select the sending Partner, in our Demo it is the ACME Druckerei.

In the partner profile go to Users and click Associate Users.

Select the user we just created and click Add.

Create the Document

B2B is all about Documents. webmethods.io B2B comes with complete sets of predefined documents for standards like EDI and RosettaNet, but here we will define our own documents. Documents defined in B2B are used to define the expected data and extract values for routing and processing.

go to Documents - Business Documents. Click Add Document.

Select XML as type from the dropdown.

Enter a name for the document type and select a project from webMethods.io Integration. In this project a document type definition will be created matching our business document, so we can map and process it in an Integration Flow. In this demo I use the project I created in the associated article Hybrid Integration: Expose a local service to webMethods.io integration (see link at the end of this article), so we can use it in our final step (the next article) to process the received document in a fully hybrid workflow. Click Next.

Select Build using - Sample XML document and drag a valid XML file to the dotted rectangle.

Click Finish.

Go to Identifiers. Select the Root Node (Here PaymenAdvice) Click Add Identifier.

Click Add.

You now have an identifying query based on the root node. Click Update.

go to Attríbutes. Select the SenderId in the document structure and click Add To Attributes.

webMethods.io B2B automatically creates the needed query on the document structure.

Select SenderID from the dropdown. In this example the field in the XML document happens to be named SenderID, but it can be any field in the recived document, like ISIN, DUNS, etc. Click Add.

Select ReceiverID in the document structure and again click “Add To Attributes”.

Select ReceiverID from the dropdown. Click Add.

Click Update.

Make sure to have the document Active.

Define the Rule (Part 1)

Documents are routed to processing by Processing Rules. As this article is only about the B2B part, we will not add the processing in a webMethods.io Integration here. This will be shown in the related article Hybrid B2B Bring the pieces together - integrate webMethods.io B2B with webMethods.io Integration (see link at the end of this article).

Go to Rules - Processing Rules. Select any rule and click Add Processing Rule. Select Above or Below* from the dropdown. Rules are processed in the order they are listed here. The first rule matching a document is used for routing. If one rule is matched, not other is executed on the document.

Name the rule. Click next.

Select the Document part and click Associate Document.

Select the Document you created before. Click Add.

Click Next.

We do not need extended criteria here. Click Next.

We leave the duplicate check and the persistence to the document definition. Click Next.

Leave the fields on the last tab as they are for now. In the next article we will add an action here. Click Next.

Do not forget to set the document to active.

Test send a document

In this demo we will just use an API Test IDE. Create a new HTTP request.

Set the action to POST. Insert the endpoint URL of the channel we created into the adress field.

Set the authentication to basic auth and enter the username and password of the partner user we created.

In the Heaers section add a key content-type and set it to text/xml:

In the body type select raw and insert the content of your xml test message. Click send.

Go to webMethods.io B2B. Select Monitoring - Transactions. webMethods.io B2B has detected the document type and using the attributes we defined, associated the document with the correct sender and receiver. Expand the line of the logged document. The status is just DONE, as we did not associate an action yet with the processing rule.

Click on the receipt date/time. This opens the detailed log.

Click on content, to inspect the received content of the message.

Please have a look at the other related articles and videos to see how we get a complete hybrid B2B integration.

Related articles & Videos

B2B as a Service: Connect a Partner via webMethods.io B2B

Article: This one!
Video: B2B as a Service: Connect a Partner via webMethods.io B2B - YouTube

Hybrid Integration: Expose a local service to webMethods.io Integration:

Article: Hybrid Integration: Expose a local service to webMethods.io integration
Video: Hybrid Integration: Expose a local service to webMethods.io integration - YouTube

Hybrid B2B Bring the pieces together - integrate webMethods.io B2B with webMethods.io Integration

Article: Hybrid B2B: Integrate webMethods.io B2B with webMethods.io Integration
Video: Hybrid B2B - integrate webMethods.io B2B with webMethods.io Integration - YouTube