Purchase Order Shipments Receipt
Streamline the receipt of purchase order shipments with OMS-generated feeds synchronized to NetSuite using Apache NiFi integration.
Purchase Orders are created in NetSuite and synced in OMS. Once the shipments are received, the Purchase Order Shipments Receipt feed is sent to NetSuite
Implementation Flow
This feed flow uses below components in the integration layer
Moqui - This is used to generate the generic OMS JSON feed to include all the Purchase Orders Receipt. So here we will not set any configurable parameters in the Service Job and it will be scheduled to run on a set frequency.
NOTE
This is done because from this generic feed, custom transformations will prepare feeds.
Apache NiFi - This is used to generate the feed format required by NetSuite.
List and Fetch the File from the input folder.
Transforms the OMS Purchase Orders Receipt Feed format into the NetSuite format using Jolt transform capabilities in-built in NiFi.
Generate the file name by appending the current time as per the timezone configured in OMS.
This helps in identifying the time at which feed is being kept for NetSuite.
Put the transformed feed file on SFTP.
Put the file in the folder for NetSuite.
Put the file in the folder for logging purpose in OMS.
NOTE this file resides in SFTP for a fixed configured duration like 30 days.
SFTP - This is used as the medium to put/read the feed files.
NiFi Flow
In the NiFi flow set up to sync OMS Purchase Orders Receipt Feed, the below processors are used.
ListSFTP
This processor is used to read the OMS Purchase Orders Receipt Feed file from the SFTP location.
FetchSFTP
This processor is used to move the OMS Purchase Orders Receipt Feed file to the archive folder after reading from the source folder.
SplitRecord
The SplitRecord processor limits the number of orders to a given number in a single file.
JoltTransformJSON
This processor is used to transform the OMS Purchase Orders Receipt Feed input JSON to NetSuite JSON format.
UpdateAttribute
Here the file name is prepared for the feed by appending the current time as per the timezone configured in OMS. This helps in identifying the time at which feed is being kept for NetSuite.
PutSftp
Two PutSFTP processors are used here: the first for eligible records for NetSuite, the second for logging this feed file for OMS.
NetSuite Purchase Orders Receipt feed Sample
If a PO has 4 items and we receive 2 items today, then the feed will include all 4 items with the first 2 items having their receipt details and the last two items having empty receipt details. Now, if we receive only the 3rd item by the next day, then the feed will include the 3rd item with the receipt details and the 4th item with empty receipt details. Here, the feed will not include the first two items again, as the order items were already sent in the earlier feed. If we receive the 4th Item now, we will include only the 4th item with its received details.
NetSuite Feed File details
FTP location
Sample Feed file Name format
Data Model mMpping
order_id
string
order id
OrderHeader.ExternalId
items.line_id
string
Line id
OrderItem.orderItemExternalId
items.quantity
string
Quantity
ShipmentReceipt.totalQuantityAccepted
Last updated