Netsuite PHP Toolkit Tips

With the right Netsuite PHP Toolkit, you can manage your chief business activities under one system. With it, you will be able to work devoid the need of some hardware and in addition, you will not need any sophisticated systems. Here are some tips associated with the toolkit, which will assist you in pulling off some functions.

Netsuite PHP Toolkit Tips

You can add a number of basic loops in the function of make-call for the sake of solving the simultaneous issues involved in the Netsuite Web services. Having been integrated with the PHP the toolkit functions will not be hemmed in blocks, for that, you will need to include them in order to be safe enough. Including the try catch blocks will help to avoid unforeseen consequences. 

• The Get Operation 

You can fetch a number of lists in the Netsuite by using the Get All Operation. In this section, you will need to write the command getAllsupportCaseIssue under the myNSClient root. You will then specify the recordRef as new, and the NSRecordRef as Internalid, 23. The type should be set as customer while the myNSClient under the GetResponse root should be set as gte$REcordRef.

• The Search, by Internal ID

For this, you will set the Search as New NSComplexObject, Contact Search Basic. You will set the field as InternalId, the operator as anyOf and the searchValue as newNSRecordRef internalid, 24. The type at this point should be set as a Contact.
You will then set the myNSClient, under the $searchResponse as search ($search).

• Clearing The Fields 

You will need to clear a field that already exists in the operation for updating. This will be done using the nullfield list. In order to clear the phone or email fields, you will need to use a command that looks this way;
$nullFieldArray [name of field]= category, whether phone or email.

Integrating Netsuite and PHP 

Integrating the two a toolkit can be easy, if it is done in the right way. Generally, Netsuite is a huge solution for business management, which has been integrated with the PHP. The integration has been used in the process of sales order and for the management of stock.

Netsuite also contains an API, which factors the ability to integrate with another system to function swiftly. This API is called the SuiteTalk, which also include the PHP toolkit.

• Customer Creation 

Using the Netsuite PHP Toolkit, you can create a Customer class within your codes. Here is how you will carry that out.
Set the $crmCustomer as new Customer, under the same command, crmCustomer, you will indicate the isPerson as true, then include the first name, last name, phone number and email. To wrap it, you will indicate the category as array (internalid), which will be noted as 1.

You will also include a Customer Address book class in the Netsuite. By doing this, you can send it directly with the relevant customer object that should be linked to the CustomerAdressbookList. The List should be able to be linked to a customer object. Other attributes like delivery and shipping addresses directed to the customer can also be included.

To do this, you will execute the following commands;

Set new CustomerAddressbookList, under the $addressList. After that, you will be needed to represent the CustomerAddressbook object originating from the PHP Toolkit. Like the customer creation, you will need to set the command $address as new CustomerAddressbook, then include the first and second addresses, the city, state and zip. You will then close it with the command $addressList, addressbook = $address. This will be meant to close the entire command.

When you are through with it, you will need to link the entire command to the customer object that you had created earlier. Here is how you will execute it;

$crmCustomer, direct it to the adressbookList which should be equated to the $addressList.

Suppose you have not set the country, the standard country that has been set in the given Netsuite PHP Toolkit will be the one used. For that, you must ensure that you have indicated the relevant country for the sake of avoiding mistakes. The Toolkit will use the default country codes that have been set previously. You will therefore need to confirm the country code and ensure that it is the one indicated in the Toolkit. Inserting a wrong code will lead to a wrong country identification.

The Addrequest Function

If you need to add a new customer entry, you will use the PHP Toolkit as a source for instantiating the AddRequest object. The code to use should be $request, then indicate, new AddRequest and under another $request command, set value as a record, then $crmCustomer.

You should keep in mind that the Netsuite will not attempt to compliment the customer details once you have sent them. Rather, it will form a novel customer within the system and for that, you must look up the customer, then revise their relevant details, once done, you will need to save it back to the system. Netsuite will help to keep the customers’ information up to date with the use of in-house references identifications.

In order to use the Netsuite as your source for your internal reference, they will be returned by Netsuite any time an action is completed. The action that can trigger Netsuite to return the references is the addition of records.

Customers Look up 

The Netsuite will apply the internal searches in order to look up the customer information. For that, you will be required to command Netsuite on the data type that you need to look up. You will also be required to indicate the filters that you will need to apply for the sake of retrieving specific data. In whichever attribute that you look up, you will need to consider some relevant objects.

As you include the relevant internal Id in the Netsuite, it will be taken back as a section of the result that you indicated array, $customerDetails, then set as InternalId. You can be able to create another Customer object and array its Internal Identification. Indicating the internal Id of the customer object will help to send an Update Request in order to reference a customer that is already in the list. With the Netsuite PHP Toolkit, you will have a systematic customer record that is presentable enough.

mm
Brooke Nelson is the Lead Author & Editor of NetSweets. With more than 20,000 customers, NetSuite is a fascinating platform! It is the major player in ERP, CRM, and ecommerce.
Brooke Nelson on FacebookBrooke Nelson on LinkedinBrooke Nelson on Twitter