Razer GRN

Razer GRN

We can now connect with Razers Grn system via an accounting integration


The Razer integration has the following unique settings

Integration Settings
client_id & client_secret: These settings are the API details provided by Razer these are required so
that we are able to connect to the API

Company Advanced Settings
PO Item Counts: This is a list of SKUs by PO Number with a count of how many times each SKU has been used on
the PO. Again this field shouldn't be edited it will be filled in automatically if you think it needs editing
please double check with an Engineer or Architect before doing so

PO Number Details: This field should be manually edited, it defines the details of the PO(s) for the
current company it has the following required format: `{poNumber}:{poDate}:{poSkuDetails}`.

The poSkuDetails has its own format for details specific to each sku on a PO.  This is where you define a SKU's
s/no number and its maximum quantity allowed on the PO it has the following required format: {poSku}/{s/noNumber}/{poSkuQuantity}

The poSkuDetails can be comma separated for multiple SKU Details and also multiple po details can be added to the
same field by adding a | between details a working example could be as follows:

A Google Sheet has been created to help build the PO Number Details string ready for entry into the advanced settings of the company.

You can request access to the Google Sheet by clicking the link to the sheet here.

  1. Only the first 5 columns need to be filled.  You can then copy the string that appears column H of the last row you filled.
  2. Go to the advanced settings of the company and find the PO Number Details field.
  3. Find the end of the current string in that field.
  4. Add a pipe symbol | and then paste the string you copied from the Google Sheet.
  5. Click Save.

Work flow

This integration when enabled will push orders that are on the status of `Delivered` into
Razer's Grn System and then it marks the orders as Invoiced by adding an attribute to each order.

This runs in the following way:

- All orders on one of the following statuses are picked up: On Hold, Dispatched, Dispatched Retailer Notified,
  Shipper Sent, and Shipper Recieved

- Any dispatched items are checked to see if they have been dispatched for over 7 days and if so they are updated
 to the status Delivered.

- Then all items from the orders that are on hold are grouped by their SKU

- The SKU groups are checked against the PO Number Details setting on the company and the SKU groups
that are in the PO Number Details are sent

- During this step it will check and add an alert to the logs if a Sku's maximum quantity has been used. This
 will cause an email to be sent if you have set yourself to receive error emails from the integration.

- Each item per quantity creates its data to send to Razer Grn, whilst this is done the current po number is
incremented and the item's sku is added to  table which counts how many of each sku has been added
to the current PO Number for use in the entryQty field

- After all the items are finished then the created data is sent to Razer to create their invoice

- If the invoice successfully creates every item sent is marked as invoiced via an internal attribute on the item
and if every item on an order has said attribute a similar attribute is then added to the order this attribute
is filtered at the beginning of the process so that any fully invoiced orders are not done, similarly when the
items are processed the item attribute is filter so already invoiced items are also not invoiced.

- Each fully invoiced order is then moved to Recieved

The following is an example of the JSON data sent to Razer

  1. {
        "postingDate": "20180521", //Current Date
        "docDate": "20180521", //PO date from settings
        "refDocNum": "4100002744", //PO Number from settings
        "goodsMovementCode": "01", //Fixed
        "items": [
                "materialNum": "RZ01-00840100-R3U1", //Order Mapped Sku
                "plant": "S101", //Leave as S101
                "storeLocation": "SW01", //Fixed
                "movementType": "101", //Default as 101
                "entryQty": 1.000, // Count for the same sku's already used on PO
                "entryUOM": "ST", //Fixed
                "entryUOMCode": "", //Fixed
                "qtyOrderPriceUnit": 0, //Fixed
                "orderPriceUnit": 0, //Fixed
                "orderPriceUOM": "", //Fixed
                "poNum": "4100002744", //PO Number from settings
                "poItemNum": 10, //Current PO Number from settings
                "movementInd": "B", //Fixed
            }, ...