0

We have a system where an order is placed using Demandware as frontend. The order details then goes into Netsuite (ERP). We need Order Tracking feature for customers where they can login and track their order. This could be built in JSP/PHP/ROR. I have installed PHP-Toolkit but do not find any order tracking API.

Working on localhost, what change should be done in NSConfig.php parameters to test sample API's provided ?

$nsendpoint = "2015_1";
$nshost = "https://webservices.netsuite.com";

$nsemail = "jDoe@netsuite.com";
$nspassword = "mySecretPwd";
$nsrole = "3";
$nsaccount = "MYACCT1";

Found one useful link that integrate Netsuite with PHP, but not sure how to get this working ?

  1. How do I track the order on frontend as a customer using Nestuite Order Tracking API ?
  2. Is there any already available API's that supports the above feature ?
  3. How and where do I test if any API for order tracking is available ?

In broader terms, it goes like below

Sample Flow

Please correct me if I am wrong somewhere.

Slimshadddyyy
  • 4,085
  • 5
  • 59
  • 121
  • I do not see what the relation to Demandware is here, apart from the possible link which customers click to visit your PHP order tracking site. Or am I misunderstanding something? – Zlatin Zlatev Oct 27 '15 at 21:17
  • Order tracking is not in PHP but demandware frontend page only. Either PHP/JAVA would act as middleware. – Slimshadddyyy Oct 28 '15 at 05:32

1 Answers1

1

You can use SuiteTalk APIs to track orders in any Server side language of your choice. NetSuite help has details on consuming the SOAP APIs in Java and PHP, for other languages you may to do some extra effort, but, it is possible.

In SuiteTalk there are APIs for Sales Order and Item Fulfillment so, that you can track order details as well as its fulfillment and shipping details.

You can search, update, create and delete orders/fulfilments from SOAP/Suitetalk APIs.

the documentations are available here as Records Guide and here as platform Guide (Might require logging into NetSuite)

Alternatively, you can write RESTlets in your NetSuite account using NetSuite's Suitescripts and bundle them (if you want to use across other NetSuite Accounts), and then use HTTPS requests from your server side language to do the CRUD operations on order/fulfulilment records.

How do I track the order on frontend as a customer using Nestuite Order Tracking API ?

From front end, I suggest to write a middleware or a web server that speaks to NetSuite APIs, as you would not want to expose the NetSUite credentials/tokens required by APIs

Is there any already available API's that supports the above feature ?

Yes, please see the linked PDFs on syntax/API help on searching/listing orders/fulfilments or else write your own RESTlet code using SuiteScript and HTTPs it.

How and where do I test if any API for order tracking is available ?

You, need to have access to a NetSuite account for that. You can request NetSuite if you are a SDN partner for a test account. If your company is not a SDN partner you can request a community supported test account using your company's email id only.

Working on localhost, what change should be done in NSConfig.php parameters to test sample API's provided ?

You cant test on localhost, you got to have a NetSuite Account

$nsendpoint = "2015_1"; //not required to change
$nshost = "https://webservices.netsuite.com"; //once you obtain the NetSuite account will vary based on you data center

$nsemail = "jDoe@netsuite.com"; // your login email
$nspassword = "mySecretPwd"; // your password
$nsrole = "3"; //your role Id (if you are an admin you can leave it)
$nsaccount = "MYACCT1"; // your netsuite account Id
prasun
  • 7,073
  • 9
  • 41
  • 59
  • Please see my question update for `NSConfig` params. Also where could I see linked PDF's for item fulfilments or order tracking ? Can't I test API from my localhost before creating Netsuite account ? – Slimshadddyyy Oct 27 '15 at 06:55
  • 1. Record Guide and Platform Guide contains the links for PDFs. 2. You cant test on localhost, you got to have a NetSuite account – prasun Oct 27 '15 at 06:57
  • prasun: i tired creating SuiteCloud Developer Network Community account. They will review and notify after one long week. Can't we have sample test logins to access `Records Guide` or will not the account mentioned in tollkit work ? – Slimshadddyyy Oct 27 '15 at 08:57
  • sorry, I don't think so, you cannot get any sort of test logins or any sort of test tool kit account. – prasun Oct 27 '15 at 09:05
  • To summarize: I need to wait until they approve my login request. Once approved, paste those details in `NSConfig` params file and then access/explore `Records Guides` for API help on searching/listing orders/fulfilments/order tracking ? Pls correct if am mistaken – Slimshadddyyy Oct 27 '15 at 09:08
  • Yes, you can also read in help topic "Using Web Services with PHP" once, you get an access to NetSuite account on details of setting up PHP environment for Suitetalk – prasun Oct 27 '15 at 09:18
  • prasun: I got my login details but can not find `role Id and netsuite account Id` ? Also I do not see Web Service Preferences under Setup > Integration. Am I missing out something ? – Slimshadddyyy Nov 09 '15 at 06:45
  • what is your role name? - If administrator then role Id is 3, if full access then role Id is 18. For account right click on page for "view source" and at the bottom you will see [ XXXXX ] [XXX@XXX.COM] [ /app/center/card.nl ], first bracket will hold your account number – prasun Nov 09 '15 at 06:48