Please enable JavaScript to view this site.

AudienceView Unlimited 7  Product Guides

 


 

Summary

Use Case

Configuration Prerequisites

Source File Format

correspondence_source_file

customer_source_file

How the Script Works

Creating and Executing the Data Management Job

Data Management Configuration

 


 

Summary

Script Name

Correspondence Load

Minimum Supported Version

7.16.0

Source Type

Single Source

Script Definitions

Correspondence Load

 

Use Case

The Correspondence Load script adds correspondence codes to a set of existing customers, based on two .CSV source files, and data provided in execution fields on the script job.

 

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. The following table lists the required field configuration for this script to run properly. For more information, refer to Configuring Marketing Data Fields.

 

 

Source File Format

The following source files are used with the Correspondence Load script:

correspondence_source_file

customer_source_file

correspondence_source_file

The following image illustrates the structure required for the correspondence_source_file source file used for the script:

 

correspondence-load_source

 

This is parent source file that contains the correspondence codes and their descriptions.

 

The following table outlines the field mapping:

Column

Required?

Source Column Header

Field Name

UI Field Location

1

Yes

code

Code

(Used as a Source Key Column)

Customer Services - Customer|Activities page

2

No

description

Description

Customer Services - Customer|Activities page

 

customer_source_file

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

 

correspondence-load_source_2

 

The following table outlines the field mapping:

Column

Required?

Source Column Header

Field Name

UI Field Location

1

Yes

customer

Customer Number

(Used as a 'Source Key' column and the customer that the correspondence will be added to.)

Customer Services - Customer|Basic page

2

Yes

code

Code

(Used as the 'Parent Key' column to link to the correspondence_source_file)

Customer Services - Customer|Activities page

 

How the Script Works

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

Condition

Action

Expected Results

Various values that can be provided in the correspondence_source_file are 'description', 'type' (if not present use the one provided in the execution field section) and 'send_date'(if it is not presently set to the current date and time).

The values provided in source file will be set accordingly.

Provided values should be set for the correspondence.

The 'Default Correspondence Type' and 'Correspondence Status' execution fields are used to set the type and status for the correspondence being added.

If the Default Correspondence Type' is not provided in the source file, the value in execution field will be used.

Both execution fields set the values for correspondence.

The 'Customer Identifier' execution field is used to define which value is used to search for the customer (either 'Customer Number', 'Customer ID' or one of the three 'Legacy Account Number' fields) .

The value selected in the execution field will define what should be provided in customer_source_file map to.

 

If a customer in the customer_source_file cannot be found, or if a correspondence code in the customer_source_file is not defined in the correspondence_source_file, the record will fail silently (no error will be logged).

If the execution field has value 'Legacy Account Number 2' then customer values provided in the source file are assumed to be 'Legacy Account Number 2'. All of the customers that match the provided 'Legacy Account Number 2' will have a correspondence code added.

 

The contact and address information on the correspondence will be the same as the default for that customer. The source file does not need to provide these fields.

 

Creating and Executing the Data Management Job

Script Definition Configuration

The following tables outline the script definition configuration:

Script Definition Name: Correspondence Load

Application Script: Correspondence Load (text/plain)

Source Section

Source Name

Source Type

Source Key Column

Parent Source Name

Parent Key Column

correspondence_source_file

Comma Separated Values

code

None

None

customer_source_file

Comma Separated Values

customer

correspondence_source_file

Code

 

Execution Field Section

Row

Field

Source Key Column

1

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.

2

Default Correspondence Type

Name: default_correspondence_type

Label: Default Correspondence Type

Type: String

Subtype: None

List: Correspondence Type

Max # Values: 1

Default Value: Ad Hoc

Group: None

Display on New Row: Yes

Required: Yes

3

Correspondence Status

Name: correspondence_status

Label: Correspondence Status

Type: String

Subtype: None

List: Correspondence Status

Max # Values: 1

Default Value: Sent

Group: None

Display on New Row: Yes

Required: Yes

 

Data Management Configuration

The following outlines the data management job configuration:

Data Management Job Name: Correspondence Load

Script Definition: Correspondence Load

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

 

Correspondence Load_Schedule-7.28