Please enable JavaScript to view this site.

AudienceView Unlimited 7  Product Guides

 


 

Summary

Use Case

Source File Format

How the Script Works

Creating and Executing the Data Management Job

Data Management Configuration

 


 

Summary

Script Name

Remove or Update Customer Benefits

Minimum Supported Version

7.28.0

Source Type

Single Source

Script Definitions

Remove or Update Customer Benefits


 

Use Case  

The Remove or Update Customer Benefits script is used to update the 'Valid Until Date' on customer benefits or to remove the benefit completely.

 

Source File Format

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

 

The following image illustrates the structure required for the customer_source_file source file:

Remove-or-Update-Customer-Benefits-7-28

The following table outlines the field mapping:

 

Column

Required?

Source Column Header

Field Name

UI Field Location

1

Yes

customer

N/A

N/A

 

 

How the Script Works

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

Condition

Action

Expected Results

A value is supplied through the source file to identify a customer.

This can be:

Customer ID

Customer Number

Legacy Account Number

Legacy Account Number 2

Legacy Account Number 3.

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

Customers that can be identified uniquely using the value from the source file and the specified identifier are loaded.

If that the customers are not identified, the script fails.

The customer is loaded successfully.

The script goes through all of the benefits for the customer to match the benefits supplied through the 'Benefit Names' execution field.

If none of the benefits supplied through the execution field exist on the customer, the script fails

The customer was loaded successfully and the customer has one or more benefits from the 'Benefit Names' execution field.

If a value for the 'Valid Until Date' execution field is supplied and the value for the 'Remove Benefits' execution field is set to No.

The script sets the 'Valid Until Date' for all of the benefits supplied through the execution field to either be the date supplied or to the current valid until date plus the duration supplied.

The customer was loaded successfully and the customer has one or more benefits from the 'Benefit Names' execution field.

If a value for the 'Remove Benefits' execution field is set to Yes regardless of whether a value for the 'Valid Until Date' execution field is supplied or not.

The script will delete the supplied benefits from the customer if there is a match. If none of the supplied benefits exist on the customer, the script generates an error.

 

Creating and Executing the Data Management Job

Script Definition Configuration

The following tables outline the script definition configuration:

Script Definition Name: Remove or Update Customer Benefits

Application Script: Remove or Update Customer Benefits

 

Source Section

Source Name

Source Type

Source Key Column

Parent Source Name

Parent Key Column

customer_source_file

Comma Separated Values

customer

None

None

 

 

Data Management Configuration

The following outlines the data management job configuration:

Data Management Job Name: Remove or Update Customer Benefits

Script Definition: Remove or Update Customer Benefits

Job Criteria Section

Field

Field Value

Pick 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 as the Customer Number.

Benefit Names

The names of the benefits on the customer to either update their 'Valid Until Date' or to remove them from the customer.

More than one benefit can be selected.

Valid Until Date

The 'Valid Until Date' to set for all of the benefits that exist on the customer based on the names supplied through the 'Benefit Names' execution field.

Remove Benefits?

Either Yes or No to determine whether the supplied benefits through the 'Benefit Names' execution field should be removed or not. The default value is set as No.

 

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

 

Remove-or-Update-Customer-Benefits_Schedule-7.28