Add Soap Operation for Creating Employee Record

Use to add one record into the system. The system returns a NetSuite identifier (internalId) that is unique for each record created within a record type.

soapAction: add

Request

<soapenv:Envelope
    xmlns:xsd='http://www.w3.org/2001/XMLSchema'
    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
    xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'
    xmlns:platformCore='urn:core_2021_2.platform.webservices.netsuite.com'
    xmlns:listEmp='urn:employees_2021_2.lists.webservices.netsuite.com'
    xmlns:platformMsgs='urn:messages_2021_2.platform.webservices.netsuite.com'>
    <soapenv:Header>
        <tokenPassport xsi:type='platformCore:TokenPassport'>
            <account xsi:type='xsd:string'>{{accountId}}</account>
            <consumerKey xsi:type='xsd:string'>{{consumerKey}}</consumerKey>
            <token xsi:type='xsd:string'>{{tokenId}}</token>
            <nonce xsi:type='xsd:string'>{{nonce}}</nonce>
            <timestamp xsi:type='xsd:long'>{{timestamp}}</timestamp>
            <signature algorithm='HMAC_SHA256' xsi:type='platformCore:TokenPassportSignature'>{{signature}}</signature>
        </tokenPassport>
    </soapenv:Header>
    <soapenv:Body>
        <add xsi:type='platformMsgs:AddRequest'>
            <record xsi:type='listEmp:Employee'>
                <entityId xsi:type='xsd:string'>Test123 Test1123</entityId>
                <firstName xsi:type='xsd:string'>Test123</firstName>
                <lastName xsi:type='xsd:string'>Test1123</lastName>
                <phone xsi:type='xsd:string'>4567891236</phone>
                <email xsi:type='xsd:string'>test1@gmail.com</email>
            </record>
        </add>
    </soapenv:Body>
</soapenv:Envelope>

Response

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header>
        <platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2021_2.platform.webservices.netsuite.com">
            <platformMsgs:nsId>WEBSERVICES_TSTDRV2747395_071720231673689732548536649_61e4dc</platformMsgs:nsId>
        </platformMsgs:documentInfo>
    </soapenv:Header>
    <soapenv:Body>
        <addResponse xmlns="">
            <platformMsgs:writeResponse xmlns:platformMsgs="urn:messages_2021_2.platform.webservices.netsuite.com">
                <platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2021_2.platform.webservices.netsuite.com">
                    <platformCore:statusDetail>
                        <platformCore:afterSubmitFailed>false</platformCore:afterSubmitFailed>
                    </platformCore:statusDetail>
                </platformCore:status>
                <platformMsgs:baseRef internalId="1227" type="employee" xsi:type="platformCore:RecordRef" xmlns:platformCore="urn:core_2021_2.platform.webservices.netsuite.com"/>
            </platformMsgs:writeResponse>
        </addResponse>
    </soapenv:Body>
</soapenv:Envelope>

Leave a comment

Your email address will not be published. Required fields are marked *