Campaign Response

The campaign response record helps you refine how you deliver marketing campaigns.

To view this record in the UI, go to an entity record and click the Marketing subtab. On the Campaigns subtab, click the Add Response button.

For help working with this record in the UI, see Tracking Campaign Responses.

The internal ID for this record is campaignresponse.

This record contains the following sublist: responses (read-only).

See the SuiteScript Records Browser for all internal IDs associated with this record.

Note:

For information about using the SuiteScript Records Browser, see Working with the SuiteScript Records Browser in the NetSuite Help Center.

For information about scripting with this record in SuiteScript, see the following:

Supported Script Types

The campaign response record is scriptable in both client and server SuiteScript.

Supported Functions

The campaign response record supports the following functions: create, read, update, and delete. The following functions aren't supported: copy, search, and transform.

Prerequisites

You must enable the Marketing Automation feature before you can use this record with SuiteScript. For more information, see Marketing Automation Overview.

Additional Details

The responses sublist is read-only. Fields on the responses sublist can't be directly created or updated; it can only be changed through the parent record, campaignresponse. Each time the campaign response record is created or updated, the responses sublist contains a new response object composed of author, date, note, and response.

Code Samples

The following samples show common actions with campaign response scripting.

Create script example:

              var record = nlapiCreateRecord('campaignresponse', true);
record.setFieldValue('entity', '295);
record.setFieldValue('campaignevent', '17');
record.setFieldValue('leadsource', '25');
record.setFieldValue('response', 'SENT');
record.setFieldValue('note', 'crate note');
var recordId = nlapiSubmitRecord(record); 

            

Update script example:

              record = nlapiLoadRecord('campaignresponse', recordId);
record.setFieldValue('response', 'RECEIVED');
recordId = nlapiSubmitRecord(record); 

            

Related Topics

General Notices