Sales Order
The following sample of the sales order e-document template and Custom Data Source plug-in implementation should be used with the sales order template. You must use the below template mapping and plug-in to successfully convert the PEPPOL XML file to a sales order transaction.
-
Inbound Sales Order Template
File Name: Sales_Order_Peppol_Template_Generic.txt
Location: Bundle 436209/Sample Templates
-
Custom Data Source Plug-in (Sales Order)
File Name: pl_custom_data_source_sales_order_inbound.js
Location: Bundle 436209/src/comp/pl
Plug-in Implementation name: Sales Order Inbound CDS
The following points are applicable to use the sales order template:
-
1. You can paste the content from the Sales_Order_Peppol_Template_Generic.txt file in the Field Mapping for Inbound E-Document field of the new E-Document Template Creation page.
-
Select the transaction type as sales order. In the template, in create mode, select Sales Order Inbound CDS from the Inbound Custom Data Source Plug-in Implementation list.
Limitations of Sample Template and Plug-in
-
Inbound conversion using inbound sales order template is not supported in SuiteTax accounts.
-
Multi-subsidiary customers are not supported for inbound conversion.
Follow the below table for mapping details:
S.NO |
JSON Key in Template |
XML Element Applied from XML Reference |
Information for the Key |
---|---|---|---|
1 |
otherrefnum |
D:Order/cbc:ID |
Displays the PO# field value in the sales order. |
2 |
currency |
D: |
Displays the currency name (International Organization for Standarization – ISO Code) in the purchase order. The value of this field is derived from the Custom Data Source plug-in (CDS) used in the template. The Custom Data Source plug-in retrieves the currency name from the currency ISO code present in the XML reference. Multi-Currency feature must be enabled in the account. |
3 |
message |
|
Displays the following custom message on the sales order: OrderDocumentReference received via PEPPOL on {DATE_TIME}. |
4 |
salesrep |
D: |
Displays the sales representative (employee). The value of this field is derived from the Custom Data Source plug-in (CDS) used in the template. The Custom Data Source retrieves the employee id from the email present in the XML reference. |
5 |
shipdate |
D: |
Displays the ship date. The value of this field is derived from the Custom Data Source plug-in (CDS) used in the template. Valid format is YYYY-MM-DD. |
6 |
shipaddress |
D: |
Consists of all the keys with ship address data. |
7 |
country |
D: |
Displays the country in the ship address. Valid format is the ISO code of country. |
8 |
addr1 |
D: |
Displays the address 1 in the ship address. |
9 |
addr2 |
D: |
Displays the address 2 in the ship address. |
10 |
addr3 |
D: |
Displays the address 3 in the ship address. |
11 |
city |
D: |
Displays the city in the ship address. |
12 |
state |
D: |
Displays the state in the ship address. |
13 |
zip |
D: |
Displays the zip in the ship address. |
14 |
item |
D:Order/cac:OrderLine |
Contains details of all line items in the XML reference. |
15 |
item |
D: |
Displays the item name or display name of the item. |
16 |
quantity |
D: |
Displays the quantity of each line item. The element value with a decimal separator (.) or a whole number is valid. Group separator (Thousands separator) or more than one decimal separator is invalid. |
17 |
rate |
D: |
Displays the net price or unit price of the item. It displays the rate of each line item, exclusive of tax. Group separator (Thousands separator) or more than one decimal separator is invalid. |
18 |
amount |
D: |
Displays the sales order line net amount. The amount is net without tax, that is, including line level allowances. |
19 |
description |
D: |
Displays the description of the item. |
20 |
taxcode |
D: (We are fetching the tax percent and from that we are finding the corresponding tax code in the account) |
Provides tax codes that are extracted from the tax rate in the XML reference. The tax code which belongs to the specific tax rate for the applicable country. In OneWorld accounts, this key will retrieve the subsidiary country information. In accounts without OneWorld, this key will retrieve information about the country from the Company Information page. Below are the possible error scenarios for the Sales Order Inbound CDS plug-in:
|