The Email Subscription Process

The following diagram describes the email subscription process:

When a user signs up for a newsletter and enters an email address, the SuiteScript API is used to return any existing Customer or Lead records from NetSuite that contain a matching address.

If the address already exists within a Customer or Lead record, SCA checks each returned record’s Global Subscription Status field, which is set to one of the following statuses. This field’s current status determines what happens next.

  • Soft Opt-In (globalSubscriptionStatus = 1): This is the preferred status. No records get updated. The site displays a message informing the user that they are already subscribed.

  • Soft Opt-Out (globalSubscriptionStatus = 2): The Global Subscription Status field updates to Soft Opt-In (globalSubscriptionStatus = 1). The site displays a message informing the user that they have signed up for the newsletter.

  • Confirmed Opt-In (globalSubscriptionStatus = 3): No records get updated. The site displays a message informing the user that they are already subscribed.

  • Confirmed Opt-Out (globalSubscriptionStatus = 4): No records get updated. The site displays a message informing the user that they cannot sign up for the newsletter.

Note

These checks occur for all matching records. The preferred record is the Customer record, so if the SuiteScript API returns both matching Customer and Lead records, SCA only updates the Customer records. SCA only updates matching Lead records if no Customer records get returned. For a description of what these statuses mean, see the help topic Subscription Management.


If no Customer or Lead records exist with a matching address, SCA creates a new Lead record and sets the Global Subscription Status field to Soft Opt-In. SCA then uses a configurable generic lead name and company name defaults to populate the record’s required Name or Company Name fields. The site then displays a message informing the user that they have signed up for the newsletter.