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.

D_AddPartner_002

Enter a name and click Add Identity

D_AddPartner_003

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

D_AddPartner_004

Click Save.

D_AddPartner_005

Make sure to enable the Partner Profile.

D_AddPartner_006

Add a second profile for the receiving trading partner.

D_AddPartner_007

Make sure to enable this Partner Profile as well.

D_AddPartner_008

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

D_AddPartner_009

Enter User Name, Full Name and set the Password.

D_AddPartner_010

D_AddPartner_011

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

D_AddPartner_012

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

D_AddPartner_013

Select the user we just created and click Add.

D_AddPartner_014

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.

E_AddDocument_001

Select XML as type from the dropdown.

E_AddDocument_002

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.

E_AddDocument_003

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

E_AddDocument_004

Click Finish.

E_AddDocument_005

E_AddDocument_006

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

E_AddDocument_007

Click Add.

E_AddDocument_008

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

E_AddDocument_009

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

E_AddDocument_011

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

E_AddDocument_012

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.

E_AddDocument_013

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

E_AddDocument_014

Select ReceiverID from the dropdown. Click Add.

E_AddDocument_015

Click Update.

E_AddDocument_016

Make sure to have the document Active.

E_AddDocument_017

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.

F_CreateRule_001

Name the rule. Click next.

F_CreateRule_002

Select the Document part and click Associate Document.

F_CreateRule_003

Select the Document you created before. Click Add.

F_CreateRule_004

Click Next.

F_CreateRule_005

We do not need extended criteria here. Click Next.

F_CreateRule_006

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

F_CreateRule_007

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

F_CreateRule_008

Do not forget to set the document to active.

F_CreateRule_009

Test send a document

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

G_SendDocument_000

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

G_SendDocument_001

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

G_SendDocument_002

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

G_SendDocument_003

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

G_SendDocument_004

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.

G_SendDocument_005

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

G_SendDocument_006

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

G_SendDocument_007

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