Please enable JavaScript to view this site.

AudienceView Unlimited 7  Product Guides

 


 

Summary

Use Case

Configuration Prerequisites

Source File Format

How the Script Works

Creating and Executing the Data Management Job

Script Definition Configuration

Data Management Configuration

 


 

Summary

Script Name

Create Multiple Events

Minimum Supported Version

7.4.0

Source Type

Single Source

Script Definitions

Create Multiple Events Using Source Events


 

Use Case

The Create Multiple Events script can be used to create multiple events based on an existing event that acts as a template with some additional values like event_code, start_time, end_time and doors_open time provided by the .CSV source file. The script creates these multiple events using the 'Save Copy' functionality where all of the other values (except the ones in the .CSV source file) are copied from the template event.

 

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. For more information, refer to Configuring Marketing Data Fields.

 

The following table lists the required field configuration for this script to run properly.

 

Field Name

Registry Location

Field Configuration

Filter Child[1-2]

Registry::EN::Business Objects:: TSperformanceBO::Filters

Lists: None

Mode:

Unbound: Default

Persistable: Default

Optional: Default

Masked: Default

Readable: Yes

Writeable: Yes

Subtype: None

multidata [1-4]

Registry::EN::Business Objects:: TSperformanceBO::Performance

Lists: None

Mode:

Unbound: Default

Persistable: Default

Optional: Default

Masked: Default

Readable: Yes

Writeable: Yes

Subtype: None

 

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 source file used for the script:

 

Multiple-Events_CSV-7-4

 

hint_outline

Hint

All timestamp values should be in the standard format (yyyy-mm-ddThh: mm:ss.sss).

 

The following table outlines the field mapping:

Column

Required?

Source Column Header

Field Name

UI Field Location

1

Yes

event_code

Event Code

Event Configuration - Events|Basic page

2

No

start_time

Start Date/Time

Event Configuration - Events|Basic page

3

No

end_time

End Date/Time

Event Configuration - Events|Basic page

4

No

doors_open

Doors Open Time

Event Configuration - Events|Basic page

 

How the Script Works

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

Condition

Action

Expected Results

A template event is selected for the 'Source Event' value on the script job before execution.

The script loads the template event which acts as the basis for creating the new set of events using the 'Save Copy' functionality with the values provided for the event_code, start_time, end_time and doors_open by the .CSV source.

The new set of events is created with the event_code, start_date, end_date and entry_date values provided by the source file, with the other values coming from the template event.

The Create Admissions value in the 'Options' field (the job schedule section of the Utilities - Data Management|Schedule page when Create Multiple Events is selected from the 'Script Definition' dropdown) is selected by default. The user can deselect the value before executing the script job.

If Create Admissions 'Option' is not selected, then no admissions will be added to the set of events created by the script. In this case, the script suppresses Warning Message #5426 so that events with no admissions can be created through 'Save Copy'.

If the Create Admissions value is selected then the set of events created by the script will contain admissions. If the value is not selected before executing the script job, then there will be no admissions for any of the events created through the script.

The start_time, end_time and doors_open values in the source file for an event being created are left blank in the source .CSV file.

The script takes the values for the start_time, end_time and doors_open from the source file without any validation for each event being created, and uses 'Save Copy' to create a copy of the template event.

An event with the event_code provided in the source file is created and the start_time, end_time and entry_date values are set based on the values in the source file. If these fields are configured in the Registry so that the 'Optional' dropdown is set to Yes, the script would create that event with no values for the above primitives/fields. If these primitives/fields are not optional, then the source record, would fail and the event would not be created due to these missing values.

 

Creating and Executing the Data Management Job

Script Definition Configuration

The following tables outline the script definition configuration:

Script Definition Name: Create Multiple Events Using Source Event

Application Script: Create Multiple Events (text/plain)

Source Section

Source Name

Source Type

Source Key Column

Parent Source Name

Parent Key Column

input_source_file

Comma Separated Values

event_code

None

None

 

Execution Field

Row

Field

Source Key Column

1

sourceEvent

Label: Source Event

Type: GUID

Subtype: Performance

Group: None

Required: Yes

List: None

Max # Values: 1

Default Value: None

2

createOptions

Label: Options

Type: Integer

Subtype: Compressed Multi

Group: None

Required: No

List: create event script options

Max # Values: 2

Default Value: Create Admissions

Data Management Configuration

The following outlines the data management job configuration:

Data Management Job Name: Create Multiple Events (for example)

Script Definition: Create Multiple Events Using Source Event

Job Criteria Section

Field

Field Value

Source Event

An event that will act as the template event for the script to use 'Save Copy'.

Options

A flag determining whether admissions should be created for the events being created by the script. If Create Admissions is selected then the events will be created with admissions. If it is not selected, the events will not contain admissions.

 

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

 

Create Multiple Events_Schedule-7.28