Routing Inbound Transaction in Software AG webMethods.io B2B Integration using Channel ID
Tags: integration, b2b, routing, tutorial
Published: 2021-10-29 12:21:53

---
title: Routing Inbound Transaction in Software AG webMethods.io B2B Integration using Channel ID
published: true
date: 2021-10-01 10:43:12 UTC
tags: #integration, #b2b, #routing, #tutorial
canonical_url: https://tech.forums.softwareag.com/t/routing-inbound-transaction-in-webmethods-io-b2b-integration-using-channel-id/244736
---

### Introduction

This article explains how [webmethods.io](http://webmethods.io) B2B can be used for routing the inbound transaction based on Channel ID

### Audience

It is assumed that readers of this article know

• How to setup B2B enterprise profile and partner on [Webmethods.io](http://Webmethods.io) B2B platform.  
• How to create the flow service on [webmethods.io](http://webmethods.io) integration.

### Pre-Requisites

• Set up B2B enterprise profile, partner profile, Business Document.

### Topics Covered

• Create Partner specific channel  
• Channel assignment to the partner  
• Create the custom document  
• Create the [webmethods.io](http://webmethods.io) integration flow service.  
• Creating the processing Rule  
• Invoke the [webmethods.io](http://webmethods.io) integration under processing rule action.  
• Update the user status based on ChannelID

### Why do we need Channel ID for Identification?

• In many cases submitted payload doesn’t have unique value to identify the sender for example: If we have custom xml which doesn’t have any unique value in content to identify the sender or receiver, then in these scenarios channel ID can be used to identify the sender.  
• Identify the B2B transaction sender without referring the payload

### Points to remember

• When using Channel ID to identify the sender, then receiver will always be selected as Enterprise profile.

• Channel ID and channel name b2b attributes will be added to system, when the document is submitted.

• Above channel information (Channel ID and channel Name) will be available as metadata when the request is submitted to [webmethods.io](http://webmethods.io) integration.

• Each Partner specific inbound channel can only be assigned to one partner.

• Below screenshot from B2B transaction monitoring page shows where we can verify the attributes added to the system  
 ![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/9/5/950eb94e88769786fb0a87012f0f02957614d1fe.png)

### Use Case:

• In our case we will submit the custom invoice xml using Http protocol using Http channel exposed by B2B.  
• Processing rule will invoke to process the request.  
• Submitted transaction will be identified based on the channel ID.  
• Under processing rule action [webmethods.io](http://webmethods.io) integration is invoked  
• This [webmethods.io](http://webmethods.io) integration is responsible for updating the user status based on channel name.

### Create Partner Specific Channel

• Login to [webmethods.io](http://webmethods.io) B2B dashboard  
• Navigate to channel tab on left hand side.  
• Create inbound channel.  
• Set the partner specific channel to “YES”

### Note:

1. Partner specific channel option is not available for SFTP protocol
2. Partner specific channel cannot be modified later.

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/3/0/309ed5fd601562b3d670c377350bab3c3e568cc7.png)

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/d/3/d3f63aa7933ce39f96c0e9729363dc1f4cd36165.png)

### Channel Assignment to partner

• Navigate to the partner profile  
• Go the inbound channel tab within the partner profile.  
• Select the newly created channel.

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/2/e/2e959f7ad7ff405fef4011cc438c414dcdc2553b.png)

### Create custom document

• Navigate to [webmethods.io](http://webmethods.io) B2B business document tab.  
• Click on Add document and select the XML type  
• Provide the name of document, in our case it is “InvoiceData”.  
• Import the document and click save.  
• Activate the document.

### Create flow service in [webmethods.io](http://webmethods.io) Integration

• Navigate to [webmethods.io](http://webmethods.io) integration  
• Under flow service section create the new flow service, In our case it is Rcv\_Invoice\_UpdateStatus.  
• Under input tab set the b2b metadata document.

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/c/1/c19fa7ee0bb1d66cab76824716e79570c48dcc7f.png)

• Set the below operation under the flow service  
 ![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/0/7/0763fc3e6009aa872ebc6e3ac2d04c4e2cd95df2.png)

• In our case we have put the logic to check the channel name and if it matches the update status in B2B using Change user status operation in B2B Application.  
• In our case we are updating the status as “Custom Completed Status”.  
 ![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/5/9/592847a7010509b7bdcfcee97a4648697a530767.png)

• Enable the flow service so that it can be invoked over Http

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/3/1/310b53eeb6439f72304c9e1a4adada3670b39f2d.png)

### Create the processing rule

• Navigate to the processing rule.  
• Click on create new processing rule  
• Under criteria select the sender as partner profile and receiver as Enterprise profile  
• Select the document type as custom document we created in above steps.  
• Under action tab select the [webmethods.io](http://webmethods.io) integration.  
• Select the project and then select the flowService from drop down menu.

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/c/6/c6643d977c9e251b6a0e8b4d93984c647b22346a.png)

### End to End Testing

• Submit the transaction using postman client.  
 ![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/a/e/ae07afdb917f876fb33b4684c70b23b8a5171fc1.png)

• Verify the transaction [webmethods.io](http://webmethods.io) B2B on monitoring Page

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/3/1/3148a7876e43534709cd5f22dcd8dd201f485849.png)

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/5/7/575356f8ce5f8ad6f88196d476647aefaa28bdbf.png)

### Monitoring on [webmethods.io](http://webmethods.io) Integration

• Below screenshot shows the details logged at [webmethods.io](http://webmethods.io) integration monitor page

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/b/d/bda13b1e4370d530df992a0916224624d59107a1.png)

Note: Attach the [webmethods.io](http://webmethods.io) integration flowService used in above Demo. [Rcv\_Invoice\_UpdateStatus.zip](https://tech.forums.softwareag.com/uploads/short-url/bYCUoawjgz0Km295dlJ335Tpb6U.zip) (8.8 KB)

[Read full topic](https://tech.forums.softwareag.com/t/routing-inbound-transaction-in-webmethods-io-b2b-integration-using-channel-id/244736)