Date: Thu, 28 Mar 2024 15:12:18 +0000 (UTC) Message-ID: <2106301972.9.1711638738106@26e80c26f302> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8_1989749170.1711638738106" ------=_Part_8_1989749170.1711638738106 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
On th= is page
Creating an invoice when a sales order is fulfilled requires that you cr= eate the invoice in your ERP system and then manually upload/enter it in th= e EDI gateway. This is mainly a manual process that utilizes significant ti= me and effort. In addition, it is challenging to handle errors and any chan= ges in the expected schema.
SnapLogic's B2B solution helps you setup a Pipeline that can automatical= ly create the invoice. This use case demonstrates how you can leverage Snap= Logic to create invoices for multiple fulfilled sales orders in NetSuite an= d then send these invoices to the EDI gateway's SFTP site.
The following Pipeline, when executed, creates an invoice for every fulf= illed order in NetSuite and sends the invoice to the EDI gateway.
This Pipeline utilizes an expression library called helpers. You can download and import this expression=
library and the above Pipeline from the Downloads=
section below into your SnapLogic org using your own dataset.<=
/span>
This Pipeline performs the following tasks:
In the use case Creating B2B Transaction -- Sales Order Use Case= we wrote the sales order created by NetSuite into a file in the SnapLogic = Database (SLDB). We now read this file to retrieve all the sales order data= by using the File Reader Snap labelled Read Result. This data is then pars= ed and sent to the Mapper Snap labelled Get SO Mapper. This Snap is configu= red to retrieve the Internal ID for each sales order.
The base reference type, salesOrder, and the Internal IDs are s= ent to the NetSuite Get Snap labelled Get Sales Order.
This enables us to retrieve the order's current state.
Item fulfillment in any system is a manual process. A sales order is dee= med fulfilled only after the merchandise/product/service is shipped. In our= use case, we simulate that process by marking the sales orders as fulfille= d or _shipped. This process is executed by the Snaps labelled Root= Mapper, Item Mapper, and Create Item Fulfillment. All these Snaps work tog= ether to provide the Internal ID.
The output from the Root Mapper Snap is passed to the NetSuite Create Sn= ap labelled Create Invoice where the invoices are created.
The NetSuite Create Snap, Create Invoice, is configured to create invoic= e based on the Internal ID it receives.
From the above output we retrieve only the base reference, type, and Int= ernal ID using the Mapper Snap, Get Invoice Mapper.
We do this since the base reference and Internal ID helps retrieve the i= nvoice's details from NetSuite using the NetSuite Get Snap labelled Get Inv= oice. This Snap retrieves the invoice's details. From these details we= retrieve the Control ID using the Mapper Snap labelled Invoice Mapper.
Now we have all the required information from NetSuite to communicate to= the EDI gateway that the sales order sent from it is fulfilled. To do so, = we perform two operations:
The invoice data is formatted as a JSON file and written to the EDI gate= way's Out sub-directory using a File Writer Snap. This establishes= a communication between the ERP system and the EDI gateway.
The invoice data is formatted as a JSON file and written into the SLDB. = You can write a SnapLogic expression to use the invoice ID and Control ID i= n the filename to keep it unique and identifiable.
Import the expression library in the Expression Libraries section.
<=
br>