NetSuite REST Azerion icon

NetSuite REST Azerion

Call NetSuite SuiteTalk REST operations.

Actions981

Campaign → Insert record

AI-generated

Summary

Insert a new NetSuite Campaign record via the REST API POST /campaign endpoint.

Inputs

  • title — Campaign title (max 99 characters).
  • startDate — Start date of the campaign.
  • endDate — End date of the campaign.
  • description — Campaign description.
  • message — Additional message for the campaign.
  • campaignId — Campaign ID if not using auto‑numbering.
  • id — Internal ID of the campaign (if known).
  • externalId — External identifier.
  • isinactive — Set to true to inactivate the campaign.
  • baseCost — Base cost of the campaign.
  • costPerCustomer — Cost per new customer.
  • convCostPerCustomer — Cost per customer conversion.
  • createdDate — Creation date (read‑only).
  • leadsGenerated — Number of leads generated.
  • conversions — Number of purchases resulting from the campaign.
  • profit — Profit earned.
  • expectedRevenue — Projected revenue.
  • roi — Return on investment.
  • totalRevenue — Total revenue from the campaign.
  • totalCost — Calculated total cost (read‑only).
  • uniqueVisitors — Unique visitors from the campaign.
  • url — Campaign landing page URL.
  • keyword — Paid keyword tracked.
  • refName — Reference name.
  • replace — Comma‑delimited sublist names to replace.
  • Prefer — Async execution preference (options: '', 'respond-async').
  • X-NetSuite-Idempotency-Key — Idempotency key for async requests.
  • X-NetSuite-PropertyNameValidation — Property name validation strictness (options: '', 'Error', 'Warning', 'Ignore').
  • X-NetSuite-PropertyValueValidation — Property value validation strictness (options: '', 'Error', 'Warning', 'Ignore').
  • debugMode — Include full request and response in the output.
  • authMethod — Authentication method (options: 'oauth1', 'oauth2').
  • additionalFields — Container for nested sub‑records (Audience, Campaign Direct Mail, Campaign Drip, Campaign Email, Campaign Event, Category, Custom Form, Default Event, Default Lead Source, Family, Item, Offer, Owner, Search Engine, Vertical).

Output shape

The created campaign record returned by NetSuite. When debugMode is true, the output also includes request details and the full HTTP response.

All writable fields supplied in the inputs are echoed back in the response, including the system‑generated internal id.

Examples

Example 1: Insert a simple campaign with title and dates

Set title to 'Spring Promotion', startDate to '2025-04-01T00:00:00Z', endDate to '2025-06-30T23:59:59Z', leave other fields blank.

Example 2: Insert campaign with custom field and async execution

Provide a custom field (fieldName='promo_code', fieldType='string', value='SPRING25'), set Prefer to 'respond-async', and provide an Idempotency Key.

Links

Discussion