There are 2 sets of methods that can be used to create sales order in DC1:
These are set of API’s which create sales order inside DI files. You don’t have validation of data you put inside files. You can use these API’s to register an order with any type, because these orders will be managed by standard DI interface. (You can e.g. use a sales order type with ‘invoicing only flag’)
Steps:
Following key values are put into DI interface:
Default and replacements Some defaults can be defined in ‘default and replacements ‘. The ‘group’ name is the same as methodSubtype passes in diSalesOrder.add. Following defaults and replacement keys are available:
API method | Group | Level | Key | description |
---|---|---|---|---|
diSalesOrder.add | {as methodSubtype} | SALES | ROUTINE | Routine id |
diSalesOrder.add | {as methodSubtype} | SALES | CUSTOMER | Customer |
diSalesOrder.add | {as methodSubtype} | SALES | ORDTDEB | Sales order type |
diSalesOrder.add | {as methodSubtype} | SALES | HANDLER | Handler |
diSalesOrder.add | {as methodSubtype} | SALES | DEBTOR_ADDRESS | Debtor addres no. |
diSalesOrder.add | {as methodSubtype} | SALES | CURRENCY | Currency |
diSalesOrder.add | {as methodSubtype} | SALES | TOPC | Terms of payment |
diSalesOrder.add | {as methodSubtype} | SALES | MOTC | Manner of transport |
diSalesOrder.add | {as methodSubtype} | SALES | TODC | Terms of delivery |
diSalesOrder.add | {as methodSubtype} | SALES | CONTRACT | Inventory contract number |
diSalesOrder.add | {as methodSubtype} | SALES | SOURCE | Order source |
diSalesOrderLine.add | {as methodSubtype} | SALES | WAREHOUSE | Warehouse |
diSalesOrderLine.add | {as methodSubtype} | SALES | MOTC | Manner of transport |
diSalesOrderLine.add | {as methodSubtype} | SALES | TODC | Terms of delivery |
diSalesOrderCreation.add | {as methodSubtype} | SALES | ROUTINE | Routine id |
diSalesOrderCreation.add | {as methodSubtype} | SALES | USER | User |
As next step the additional defaults and replacements are used by DC1 system itself.
Routine | Group | Level | Key | description |
---|---|---|---|---|
Sales order creation process | {as methodSubtype} | SALES | REPRICE | Reprice (Y/N). Use “N” for manual price |
Sales order creation process | {as methodSubtype} | DFTORDT | ORDERTYPE | Sales order type |
Sales order creation process | {as methodSubtype} | DFTORDT | HANDLER | Handler |
These are set of API’s to create order in interactive mode. The validation is included, in case of error during, the API will return an error message in the response. In this way you create an order at the first step by salesOrderHeader.add and next you can add/change lines, texts, discounts, batches.
NOTE: Interactive API’s can create orders up to status 20.
NOTE: There is limitation that order types must be set up to print pick list: After the order is entered via the API into DC1, there is no API to interactively push the client to execute the pick process. These API’s are to register the order only and the picking, packing, transport, and invoicing is done in DC1 in “normal way”. This set of API’s is to use in case you would like to interact with the user. In this method client has to enter all mandatory parameters and react on erro messages if validation fails.
Following methods are used to maintain sales order:
Example 1 : creating sales order using DI Execute the steps in the following order:
{
"method":"diSalesOrder.add",
"params":{
"methodSubtype":"{{methodSubtype}}",
"customer":"{{businessPartner}}"
}
}
e.g.
{
"method":"diSalesOrder.add",
"params":{
"methodSubtype":"SALESDFTUX",
"customer":"AL191555"
}
}
This returns a transmissionid to be used in subsequent calls e.g 250
{
"method": "diSalesOrderAddress.add",
"params": {
"transmissionId": "{{transmissionId}}",
"addressType": "{{addressType}}",
"name": "{{name}}",
"addressLine1": "{{addressLine1}}",
"addressLine2": "{{addressLine2}}",
"addressLine3": "{{addressLine3}}",
"addressLine4": "{{addressLine4}}",
"postalCode": "{{postalCode}}",
"country": "{{country}}",
"state": "{{state}}"
}
}
e.g.
{
"method": "diSalesOrderAddress.add",
"params": {
"transmissionId": "250",
"addressType": "I",
"name": "John Doe",
"addressLine1": "30, Light Avenue",
"addressLine2": "",
"addressLine3": "",
"addressLine4": "San Fransisco",
"postalCode": "85054",
"country": "US",
"state": "CA"
}
}
Returns empty response if OK.
{
"method": "diSalesOrderLine.add",
"params": {
"transmissionId": "{{transmissionId}}",
"item": "{{item}}",
"quantity": "{{quantity}}",
"description": "{{itemDescription}}"
}
}
e.g
{
"method": "diSalesOrderLine.add",
"params": {
"transmissionId": "250",
"item": "120563",
"quantity": "3,00",
"description": "iPhone"
}
}
Returns empty response if OK.
{
"method":"diSalesOrderCreation.add",
"params":{
"transmissionId":"{{transmissionId}}"
}
}
e.g.
{
"method":"diSalesOrderCreation.add",
"params":{
"transmissionId": "250"
}
}
Returns empty response if OK.