Introduction
This article explains about how trading partner agreement can be configured and used in webmethods.io B2B.
Audience
It is assumed that readers of this article know how to set up B2B enterprise profile and partner on webmethods.io B2B platform.
Prerequisites
- Set up B2B enterprise profile, partner profile, Business Document
Topics Covered
- Introduction to trading partner agreement (TPA)
- Usage of trading partner agreement (TPA)
- Create TPA template and definitions
- How to get the TPA details in webmethods.io integration
- End to End working flow
Use Case:
- In our case, we will be sending the EDI message to B2B using the inbuilt EDI template.
- Once the message is submitted to B2B, the processing rule will get invoke and it will verify the extended criteria.
- Post successful validation of criteria, actions will be taken.
- In our case, we are invoking webmethods.io integration from processing rules.
- Once the request reaches webMethods.io integration, GetTPA operation available in B2B application invoked to get the TPA details from B2B.
What is Trading partner agreement (TPA)?
-
Trading Partner Agreement (TPA) definitions are a set of parameters that help you tailor how documents are exchanged between two trading partners.
-
Each TPA contains specific information about how documents must be exchanged between two trading partners.
a. The partner that represents the sender of the documents.
b. The partner that represents the receiver of the documents.
c. An agreement ID that identifies the type of TPA (for example, TPAs for EDI business documents use the agreement ID EDITPA).
What’s the use of TPA?
- webMethods.io B2B does not use TPAs when determining the processing rules to use for a document.
- Parameters that we specify in the TPA are available for our own use. For example, we can access the TPA information from integrations called by a processing rule.
- Accessing this information allows you to build a document exchange application that uses the TPA to tailor the exchange of documents between partners.
Create Template
- TPA Templates are configuration structures that are used as references to create a TPA definition by reusing configurations. There are two types of TPA templates:
System Templates: These templates enable the partners using certain types of business documents to function as intended. These templates cannot be modified. For example, RNIFV1, EDIV1.
Custom templates: We can create our own TPA templates based on specific document exchange parameters.
- In Our case we will be using the inbuilt EDI template to send the EDI message.
Create Definitions
- Navigate to agreement tab.
- Click on TPA definition.
- Click on Add definition.
- Select the agreement name, in our case it will be EDITPA.
- Provide the sender name, in our case it will be ABC Corporation.
- Provide the receiver name, in our case it will shipping Enterprise.
- Select the template structure from drop down menu, in our case it will be EDIV1.
- We also provide the option to download the TPA.
- Downloaded file will be in json format.
- Provide the details as per business requirement.
- Upload the updated TPA agreement.
- Change the status from proposed to agreed
TPA Status
-
Proposed. When the agreement status is proposed, a TPA is in a draft status. You can modify the TPA fields and data input.
-
Agreed. An agreed status means that the TPA is final. When the agreement status is agreed, the data statuses take effect.
-
Disabled. The disabled status means the TPA should not be used. If you are using a TPA and no longer want to use it, you can disable it. When you disable a TPA, the TPA remains in the webMethods.io B2B but is considered inactive.
Modify processing rule in B2B
-
In our case, we are sending the inbound transaction to B2B using the HTTP protocol.
-
We will be adding extended criteria conditions to check the particular field value in the payload.
-
While creating the definition we have added condition on processing mode.
-
If the processing mode is testing, then only EDITPA will get invoked.
- Open the processing rule.
- Go to the extended criteria section
- Set the below condition.
GetTPA operation in webemethods.io Integration
- Navigate to webmethods.io integration.
- Open the flow service.
- In our case it Rcv850_EDITPA.
- Open the flow service.
- Select the webmethods.io B2B application.
- Select the GetTPA operation from the drop-down.
Test using postman client
Payload
ISA*00* *00* *01*123456777 *01*987654333 *031008*1040*U*00401*000000001*1*T*>~
GS*IN*123456777*987654333*20030627*1304*1*X*004010~
ST*810*01403001~
BIG*20030627*SA*20030627~
FOB*PB~
PKG******01~
N9*AH*548177~
MSG*THIS PURCHASE ORDER IS SUBJECT TO THE SAME TERMS AND~
TDS*12~
SAC*A*B280***20.00***2.00****02~
CTT*1**120*LB~
SE*10*01403001~
GE*1*1~
IEA*1*000000001~
Submit the request from Postman client
- Select the method as POST
- Paste the body
- Provide the HTTP endpoints which is associated to the partner
- Provide the user cred associated with the partner
- Submit the request
- In the below request if you notice we are passing “T” in my first line of payload.
- This will be used to satisfy the condition configured at the processing rule.
Transaction Monitoring
- In the below screenshot it shows the message has been processed and EDITPA has been selected.
TPA details in webmethods.io Integration
-
In our case flow service is invoked from B2B
-
Inside the flow service we are logging the TPA data fetching from B2B using GetTPA operation available in webMethods.io B2B application.