Please enable JavaScript to view this site.

AudienceView Unlimited 7  Product Guides

 


 

Summary

Use Case

Configuration Prerequisites

Source File Format

How the Script Works

Data Management Configuration

 


 

Summary

Script Name

Update Customers and Benefits

Minimum Supported Version

7.23.0

Source Type

Single Source

Script Definitions

Update Customers and Benefits


 

Use Case

The Update Customers and Benefits script updates the data on existing customers and creates new customers. It also updates the 'Start Date' and 'Valid Until Date' fields on customers' existing benefits or adds new benefits to the customers.

 

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.

hint_outline

Hint

All of the marketing data that you want to update or add should have 'Readable' and 'Writable' set to Yes otherwise these fields will not be updated. For more information, refer to Configuring Marketing Data Fields.

 

 

Source File Format

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

 

The customer_source_file source file is used with the Update Customers and Benefits script:

Update-Customer-and-Benefits_source_file.jpg

Column

Required?

Source Column Header

Field Name

UI Field Location

1

Yes

customer

'Customer Number' / 'Legacy Account Number [1-3]'

Customer Services - Customer|Basic page

2

No

first_name

First Name

Customer Services - Customer|Basic page

3

No

last_name

Last Name

Customer Services - Customer|Basic page

4

No

phone_number1

Home Phone

Customer Services - Customer|Basic page

5

No

street

Street

Customer Services - Customer|Basic page

6

No

city

City

Customer Services - Customer|Basic page

7

No

state

Province / State

Customer Services - Customer|Basic page

8

No

zip

Postal Code

Customer Services - Customer|Basic page

9

No

country

Country

Customer Services - Customer|Basic page

10

No

user_name

User Name

Customer Services - Customer|Users page

11

No

password

Password

Customer Services - Customer|Users page

12

No

authentication_type

Authentication Type

Customer Services - Customer|Search page

13

No

data1

Marketing Data 1

Customer Services - Customer|Basic page

14

No

benefit_name

Benefit Name

Customer Services - Customer|Entitlements|Benefits page

15

No

benefit_start_date

Start Date

Customer Services - Customer|Entitlements|Benefits page

16

No

benefit_valid_until_date

Valid Until Date

Customer Services - Customer|Entitlements|Benefits page

 

How the Script Works

The following table outlines the actions and expected results of the script:

Condition

Action

Expected Results

The script looks for the 'Customer' field from the .CSV source file and map it to the 'Customer Number' or 'Legacy Account Number [1-3]' fields based on what is selected in 'Customer Identifier' execution field.

If the customer is found, the existing values will be overwritten with the values from the .CSV file except for the 'User Name', 'Authentication Type' and 'Password' fields.

If a 'Benefit Name' is supplied then the script will find existing benefits on customers where the 'Benefit Name' matches and the existing 'Valid Until Date' is not in the past.

If a matching benefit is found then the 'Start Date' and 'Valid Until Date' will be updated with the supplied values.

If no matching benefit is found then a new benefit will be added to the customer using the 'Benefit Name', 'Start Date' and 'Valid Until Date' supplied.

If 'Start Date' is not supplied then the current date/time will be used.

If a 'Valid Until Date' is not supplied then the date set on the benefit wil be used.

All customer fields will be updated. Benefit will be added or updated on the existing customer.

If the customer is not found.

A new customer is created using the values supplied.

The 'Language' and 'Organization Type' will be set to the system defaults. if a 'User Name' is supplied and the 'Authentication Type' is set to Shibboleth, then a user with no password will be added to the customer.

If a 'User Name' and 'Password' are supplied and the 'Authentication Type' is blank, a user with the supplied password will be added to the customer.

If a benefit name is supplied then a new benefit will be added to the customer using the 'Benefit Name', 'Start Date' and 'Valid Until Date' supplied.

If 'Start Date' is not supplied then the current date/time will be used.

If a 'Valid Until Date' is not supplied then the date set on the benefit wil be used.

A new customer will be created with the benefits added.

If no value for the customer is provided in the .CSV file.

The following error message will be thrown:

A value for customer is required.

The script will fail, identifying the record.

If there is a value for 'Authentication Type' but no value for 'User Name'.

The following error message will be thrown:

If authentication_type is supplied, user name is required.

The script will fail, identifying the record.

If the 'Authentication Type' value is not Shibboleth.

The following error message will be thrown:

Only "Shibboleth" is supported as an authentication_type.

The script will fail, identifying the record.

If a 'Start Date' is supplied but not a 'Benefit Name'.

The following error message will be thrown:

If benefit start date is supplied, benefit name is required.

The script will fail, identifying the record.

If a 'Valid Until Date' is supplied but not a 'Benefit Name'.

The following error message will be thrown:

If benefit valid until date is supplied, benefit name is required.

The script will fail, identifying the record.

If a 'Password' is supplied but not a 'User Name'.

The following error message will be thrown:

If password is supplied, user name is required.

The script will fail, identifying the record.

If a 'User Name' is supplied but not an 'Authentication Type' or 'Password'.

The following error message will be thrown:

If user name is supplied, either authentication_type or password is required.

The script will fail, identifying the record.

If 'Authentication Type' and 'Password' are both supplied.

The following error message will be thrown:

Either authentication_type or password can be supplied, but not both.

The script will fail, identifying the record.

 

Data Management Configuration

The following outlines the data management job configuration:

Data Management Job Name: Update Customers and Benefits

Script Definition: Update Customers and Benefits

Job Criteria Section

Field

Field Value

Customer Identifier

Used to determine how the customer will be matched:

Customer Number

Legacy Account Number 1

Legacy Account Number 2

Legacy Account Number 3

 

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

 

Update-Customers-and-Benefits-Data-Management-Schedule-7-23.jpg