Netsuite – Pharmsaver Integration

This proposal covers the Netsuite – Pharmsaver Integration.

Proposal summary

The proposal includes the actions between the Netsuite and Pharmsaver.net platform. Pharmsaver will initiate the RealTimeInventory request to Netsuite and the Netsuite will return the item details. Pharmsaver will initiate  a request for “Whole-saler order”, which will create sales orders in Netsuite. And Shipping Confirmation will be initiated from the Netsuite and Pharmsaver will provide the response which will be updated to Netsuite. A scheduled action will provide the details of the “transactional statement” from Netsuite.

Requirement 

Pharmsaver.net is a platform with a membership of pharmacies.  Their membership logs onto the platform and are shown products and pricing from multiple pharmaceutical wholesalers and distributors.  Second Source Rx is a pharmaceutical distributor and hopes for their products to be offered on this platform as well.

Our Solution

Netsuite can interact with the Pharmsaver.net using the web services possibilities. This integration uses RESTlet web services to interact with the Pharmsaver.net.

The proposed actions between Netsuite and pharmasaver are as follows.

1) RealTimeInventory check  (Restlet, JSON)

2) Send Wholesaler Order (Restlet, JSON)

3) Shipping Confirmation from NetSuite (Suitelt, XML)

4) Transactional Statements (Suitelt, XML)

1) RealTimeInventory check

  • This will be initiated when the user has a cart and is approaching checkout in Pharmsaver. The real-time inventory is used to acquire current inventory status from participating wholesalers. The service is started at the beginning of a pharmacy checkout. If inventory is flagged as unavailable, checkout is blocked and the pharmacy user will need to alter their cart, either by changing the number of quantities to order or by reassigning the item to a different wholesaler.
  • Pharmsaver can initiate requests to Netsuite using Restlet. The request and response will be in JSON format.
  • From Netsuite, we can return the Qty available, quantity limit and QtyOnHand along with item details to the Pharmsaver.

Note: And for the authentication we will create a custom role and will use the employee “In8Sync Support” as integration user.

2) Send Wholesaler Order

  • The Send Wholesaler Order web service is used to transmit new orders to a wholesaler immediately after being placed by the pharmacy.
  • This request will be initiated from Pharmsaver and creates sales orders in Netsuite.
  • Pharmsaver will initiate the request to Netsuite using the provided Restelet Url. The input and output will be in JSON format. 
  • The Restlet URL(Which will be provided from Jobin and jismi IT services LLP) needs to be initiated with OAuth signature from Pharmsaver.
  • The OAuth signature needs to be created from the Pharmsaver and it can be created based on the credentials provided from the Netsuite (Which will also be provided from Jobin and jismi IT services LLP). The signature needs to be initiated at each time, when Pharmsaver requests the Restlet URL.
  • Upon the Restlet URL invocation, the Restlet script in Netsuite will be initiated and create the sales order in Netsuite (Create custom record in Netsuite with the request. And based on the details in the custom record, sales order will be created in Netsuite).
  • We will create a custom field in the sales order of Netsuite for flagging whether the sales order is created via Pharmsaver integration or not.
  • If the sales order creates, then return the “Success” response to the Pharmsaver. If the request fails due to any of the reasons, then it will be stored in a custom record.

Note: For the successful creation of sales order the customer, items etc should be predefined in Netsuite. And we will provide the field mapping by comparing the fields in Netsuite with the request sample in Pharmsaver documentation. And we need to create custom fields in Netsuite based on the mapping, if the standard field is not available.

3) Shipping Confirmation from NetSuite

  • The Wholesaler Shipping web service is used to receive order shipping confirmations from a participating wholesaler.
  • The shipping confirmation request will be initiated from the Netsuite in the form of XML, when the order is picked.(Ie: At the time of IF creation)

Note: This is applicable only for the item fulfillment in which the parent sales order is created via pharmesaver integration.

  • We are using the permanent API key: “49105A578AF2”. Since the API key is permanent, we don’t need to create a new API key at each time of  the request.
  • And the response from the Pharmsaver for the shipping confirmation request will be stored in a custom field of item fulfillment.
  • We assume that all the necessary fields in the request are readily available in Netsuite. 

Note: And we will provide the field mapping by comparing the fields in Netsuite with the request sample in Pharmsaver documentation.

4) Transactional Statements

  • The Transaction Statements Web Service is used to receive drug transactional statements (pedigrees) from a participating wholesaler using HTTP POST request method along with XML.
  • send the transactional statement after the order is picked and shipped either as a process that runs overnight or the next morning.
  • “Transaction Statements” request will be initiated from Netsuite on a scheduled basis, which will find all the Item fulfillment which is shipped(and it’s parent sales order created via pharmsaver integration). Then return the data in XML format. 

Note: And we will provide the field mapping by comparing the fields in Netsuite with the request sample in Pharmsaver documentation.

We have seen that the “Transaction Statements” returns the invoice number from the netsuite. So, does this request need to be initiated upon invoice creation in Netsuite?

We have already discussed that we will send the transnational statement once the order is changed to the status shipped(Trigger is from Netsuite). But in the documentation, the invoice data is also going to Pharmsaver. So this is added to confirm whether we have the invoice information also be there at the time of shipped status.

Assumptions

  • Entities(customer, shipping methods etc) and items should be predefined in Netsuite.

Inputs from Pharmsaver side:

  • Pharmsaver needs to send the JSON documentation with a sample for “Real time inventory” and “send wholesaler order” .

Inputs from Pharmsaver / Netsuite side:We have seen that the “Transaction Statements” returns the invoice number from the Netsuite. So, does this request need to be initiated after invoice creation in Netsuite?

Leave a comment

Your email address will not be published. Required fields are marked *