Gift Certificate Item

You can create gift certificate items that allow customers to purchase store credit they can send to someone as a gift. The recipient uses the gift certificate code when placing an order through your Web store or entering a transaction with a sales representative. You can set a preference in NetSuite for how you want to generate the gift certificate codes: you can create them yourself, or use a random hash code automatically generated by the system.

For more information about using this record in the UI, see Gift Certificates.

Supported Operations

add | addList | delete | deleteList | get | getList | getSavedSearch | getSelectValue | search | update | updateList | upsert | upsertList

Note:

You can also use the asynchronous equivalents of SOAP web services list operations. For information about asynchronous operations, see SOAP Web Services Asynchronous Operations. For more information about request processing, see Synchronous Versus Asynchronous Request Processing.

Field Definitions

The SOAP Schema Browser includes definitions for all body fields, sublist fields, search filters, and search joins available to this record. For details, see the SOAP Schema Browser’s gift certificate item reference page.

Note:

For information on using the SOAP Schema Browser, see SOAP Schema Browser.

Usage Notes

This sample shows how to add a gift certificate item. Note that the following has been set in the NetSuite account: Setup > Accounting > Accounting Preferences > Items/Transactions tab > Other Items Preferences > Gift Certificate Auth Code Generation = System Generated.

SOAP Request

          soapenv:Body>
      <add xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
         <record xsi:type="ns6:GiftCertificateItem" xmlns:ns6="urn:accounting_2017_1.lists.webservices.netsuite.com">
            <ns6:itemId xsi:type="xsd:string">BeyondMotorSports.com Gift Certificate</ns6:itemId>
            <ns6:isInactive xsi:type="xsd:boolean">false</ns6:isInactive>
            <ns6:liabilityAccount internalId="28" type="account" xsi:type="ns7:RecordRef"
              xmlns:ns7="urn:core_2017_1.platform.webservices.netsuite.com" />
            <ns6:rate xsi:type="xsd:double">100.0</ns6:rate>
            <ns6:taxSchedule internalId="1" xsi:type="ns8:RecordRef"
              xmlns:ns8="urn:core_2017_1.platform.webservices.netsuite.com" />
         </record>
      </add>
   </soapenv:Body> 

        

SOAP Response

           <soapenv:Body>
      <addResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
         <writeResponse>
            <ns2:status isSuccess="true" xmlns:ns2="urn:core_2017_1.platform.webservices.netsuite.com" />
            <baseRef internalId="93" type="giftCertificateItem" xsi:type="ns3:RecordRef"
              xmlns:ns3="urn:core_2017_1.platform.webservices.netsuite.com" />
         </writeResponse>
      </addResponse>
   </soapenv:Body> 

        

Java

          GiftCertificateItemAuthCodes authCode1 = new GiftCertificateItemAuthCodes();
authCode1.setAuthCode("AUTHCODE003");
 
GiftCertificateItemAuthCodes authCode2 = new GiftCertificateItemAuthCodes();
authCode2.setAuthCode("AUTHCODE004");
 
GiftCertificateItemAuthCodes[] authCodes = new GiftCertificateItemAuthCodes[2];
authCodes[0] = authCode1;
authCodes[1] = authCode2;
 
GiftCertificateItemAuthCodesList authCodesList = new GiftCertificateItemAuthCodesList();
authCodesList.setAuthCodes(authCodes);
authCodesList.setReplaceAll(true);
 
RecordRef liabilityAccount = new RecordRef();
liabilityAccount.setInternalId("28");
liabilityAccount.setType(RecordType.account);
        
RecordRef taxSchedule = new RecordRef();
taxSchedule.setInternalId("1");
   
GiftCertificateItem gcItem = new GiftCertificateItem();
gcItem.setItemId("BeyondMotorSports.com Gift Certificate");
gcItem.setLiabilityAccount(liabilityAccount);
gcItem.setTaxSchedule(taxSchedule);
gcItem.setRate(100.00);
gcItem.setIsInactive(false);
 
WriteResponse response = _port.add(gcItem); 
WriteResponse response = _port.add(gci); 

        

Related Topics

Items
Usage Notes for Item Record Types
Working with Matrix Items in SOAP web services
Shared Field Definitions for Items
Item Search
How to Use the SOAP Web Services Records Help
SOAP Web Services Supported Records
SOAP Schema Browser
SuiteTalk SOAP Web Services Platform Overview

General Notices