Please enable JavaScript to view this site.

AudienceView Unlimited 7  Product Guides

Navigation: Utilities > Utilities - Data Management > Core Data Management Scripts > Customer Scripts

Script: Update Customer Communication and Marketing Preferences

Scroll Previous Top Next More

 


 

Summary

Use Case

Configuration Prerequisites

Source File Format

How the Script Works

Data Management Configuration

 


 

Summary

Script Name

Update Customer Communication and Marketing Preferences

Minimum Supported Version

7.28.0

Source Type

Single Source

Script Definitions

Update Customer Communication and Marketing Preferences


 

Use Case

The Update Customer Communication and Marketing Preferences script updates the customer’s communication and marketing preferences based on the execution fields that either select or deselect preferences(s) for a set of customers based on the values supplied through source file.

 

The customer identifier can be one of the following:

Customer ID

Customer Number

Legacy Account Number

Legacy Account Number 2

Legacy Account Number 3

Email

info_outline

Information

The supplied email address searches all email of the addresses on the contacts record (email and e_address[1-3]) to find the matching customer. If there are multiple matches, all of the customers are updated with the supplied preferences.

 

Configuration Prerequisites

If fields referenced in the script do not have 'Writable' set to Yes, the script will still run successfully but those fields will not be updated.

 

Field Name

Registry Location

Field Configuration

communication_preferences

Registry::EN::Business Objects:: TScustomerBO::Customer

Lists: Communication Preferences

Mode:

Unbound: Default

Persistable: Default

Optional: Default

Masked: Default

Readable: Yes

Writeable: Yes

Subtype: Compressed Multi

marketing_preferences

Registry::EN::Business Objects:: TScustomerBO::Customer

Lists: Marketing Preferences

Mode:

Unbound: Default

Persistable: Default

Optional: Default

Masked: Default

Readable: Yes

Writeable: Yes

Subtype: Compressed Multi

 

Source File Format

This script is run using a single .CSV or BI (saved as a text/csv 'Extract Tempate') source file.

 

The following images illustrates the structure required for the customer_source_file using customer number values in the source file:

 

Update Preferences_source customer-7.28

 

The following images illustrates the structure required for the customer_source_file using email address values in the source file:

 

Update Preferences_source email-7.28

 

The following table outlines the field mapping:

Column

Required?

Source Column Header

Field Name

UI Field Location

1

No

customer

A value is supplied through the source file to identify a customer. This can be the:

Customer ID

Customer Number

Legacy Account Number

Legacy Account Number 2

Legacy Account Number 3

Email Address

Customer Services - Customer|Basic and/or Customer|Advanced pages

 

How the Script Works

The following table outlines the business logic implemented by the script:

Condition

Action

Expected Results

A value is supplied through the source file to identify a customer. This can be the:

Customer ID

Customer Number

Legacy Account Number

Legacy Account Number 2

Legacy Account Number 3

Email Address

The script loads the customer using the supplied value and the value of the 'Customer Identifier' execution field from the script job.

If an email address is provided, a search for all customers with the given email address across all of the email address primitives on the contacts record is performed.

If the customer can be identified uniquely using the value from the source file and the specified identifier (other than an email address), the customer is loaded.

If using email address, all of the customers with the specified email address are found. If no matches for the email address are found the script fails.

The customer(s) are loaded successfully.

The script goes through all of the values provided through the execution fields and updates the associated primitive to update the communication or marketing preferences based on the action for each preference supplied through the execution fields. If no action is provided for the multi primitive, the primitive is not updated.

The customer is updated.

Data Management Configuration

The following outlines the data management job configuration:

Data Management Job Name: Update Customer Communication and Marketing Preferences

Script Definition: Update Customer Communication and Marketing Preferences (text/html)

Job Criteria Section

Field

Field Value

Customer Identifier

Any value from the customer identifiers list can be used, based on the values in the source file to identify a customer uniquely. The default value is set to Customer Number.

Action for Communication Preference

The action to use to update the specified communication preference for the customer.

Communication Preference

The supplied value for the communication preference to update based on the corresponding action.

Action for Marketing Preference

The action to use to update the specified marketing preference for the customer

Marketing Preference

The supplied value for the marketing preference to update based on the corresponding action.

 

The following image is an example of theData Management|Schedule page when creating a job using all of the available source files:

 

Customer Preferences_schedule-7.28