When you receive transactions from your partner, you may need to route them to another party.
For example, your partner may request you to send a "copy" of the transaction they sent you to the broker. Or you may subcontract a business part of your supply chain process to a Third-Party and need to send a "copy: of the transaction to this Third-Party.
Important: In these use cases, the party receiving a "copy" of the transaction actually receives a copy of the transaction set but the EDI header information is different, meaning the sender of the transaction becomes yourself and the receiver of the transaction becomes your Third-Party.
Orderful sends the transactions you receive to one communication channel. You can then leverage Orderful APIs to implement the routing you need in your connector.
In this article, we'll present a use case and a solution you can implement in your connector. Our solution relies on the following prerequisites:
- You receive transactions through a HTTP or Poller communication channels.
- The data format you trade is JSON, meaning you receive transactions in JSON.
- You built a connector that processes transactions you receive through your communication channel before sending them to your ERP or SOR.
Use case: You receive a transaction from your partner that you want to forward in X12 to another partner
For each transaction you want to forward to a third-party, you must have a relationship with the same transaction type, the opposite direction, you as the sender and the Third-Party as the receiver.
Make sure you create a new partnership with this Third-Party before implementing the following solution.
More details on these articles: Add a new Trading Partner, Configure Relationships, Complete Scenario Testing, Skip scenario testing.
Here are the process you can use to configure this routing on your connector:
Step 1A: Retrieve the transaction type
From the JSON transaction you polled or received to your HTTP communication channel, retrieve the transaction in JSON from the property `type.name`.
Step 1B: Retrieve the transaction stream
From the JSON transaction you polled or received to your HTTP communication channel, retrieve the transaction in JSON from the property `stream`.
Step 1C: Retrieve the JSON transaction message
From the JSON transaction you polled or received to your HTTP communication channel, retrieve the transaction in JSON from the property `message`.
Step 2: Post a JSON transaction to Orderful
To post a JSON transaction to Orderful, use the Orderful API:
The body of the HTTP Request should be formatted as follow:
"isaId": "<Your ISA ID>",
"isaId": "<THIRD-PARTY ISA ID>",
"name": "<Transaction type from step 1A>"
"stream": "<Transaction stream from step 1B>",
"message": <Transaction message from step 1C>,
Step 3: Send your JSON to you ERPs
Send the JSON transaction from step 1C to your ERP to process the transaction you receive.
Note: If you need to format or process the JSON transaction before sending it to your ERP, you can implement this custom logic in your connector.