Example of Getting a Campaign Response Record

This sample shows how to get a campaign response record. Note that in this example, the campaignResponseDate value returned in the SOAP response is the date the record was created in NetSuite, not the date you might have specified representing the time of the entity’s response. (The latter value is specified in the responseDate field of the responsesList. Note that you cannot modify the responsesList values, nor can you delete them through SOAP web services, though in some cases you can delete them through the UI.)

In response to a get operation, the campaignResponseDate field shows only a date, not a time. The time returned is always 00:00:00.000.

C#

          private void getCampaignResponse()
{
   RecordRef recordCampaignResponse = new RecordRef();
   recordCampaignResponse.internalId = "303";
   recordCampaignResponse.type = RecordType.campaignResponse;
   recordCampaignResponse.typeSpecified = true;
   _service.get(recordCampaignResponse);
} 

        

SOAP Request

          <soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soap:Header> ...
    </soap:Header>
    <soap:Body>
        <get xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
            <baseRef type="campaignResponse" internalId="303" xsi:type="q1:RecordRef" xmlns:q1="urn:core_2017_1.platform.webservices.netsuite.com"/>
        </get>
    </soap:Body>
</soap:Envelope> 

        

SOAP Response

          <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/">
    <soapenv:Header> ...
    </soapenv:Header>
    <soapenv:Body>
        <getResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
            <readResponse>
                <platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"/>
                <record xsi:type="listMkt:CampaignResponse" internalId="303" xmlns:listMkt="urn:marketing_2017_1.lists.webservices.netsuite.com">
                    <listMkt:entity internalId="1766" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com">
                        <platformCore:name>3 ABC Co.</platformCore:name>
                    </listMkt:entity>
                    <listMkt:leadSource internalId="-5" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com">
                        <platformCore:name>557 Trade Show</platformCore:name>
                    </listMkt:leadSource>
                    <listMkt:campaignEvent internalId="13" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com">
                        <platformCore:name>[Default Event]</platformCore:name>
                    </listMkt:campaignEvent>
                    <listMkt:campaignResponseDate>2013-10-04T00:00:00.000-07:00</listMkt:campaignResponseDate>
                    <listMkt:response>_responded</listMkt:response>
                    <listMkt:responsesList>
                        <listMkt:responses>
                            <listMkt:response>Responded</listMkt:response>
                            <listMkt:responseDate>2013-09-27 08:45:00</listMkt:responseDate>
                            <listMkt:author>Smith, John</listMkt:author>
                            <listMkt:note>note text</listMkt:note>
                        </listMkt:responses>
                    </listMkt:responsesList>
                </record>
            </readResponse>
        </getResponse>
    </soapenv:Body>
</soapenv:Envelope> 

        

Related Topics

General Notices