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

Add Scheduled Payments

Minimum Supported Version

7.27.0

Source Type

Business Intelligence (BI)

Single Source

Script Definitions

Add Scheduled Payments

 

warning_outline

Warning

Never use 'Dry Run' when payments are involved. It will send the payments to the gateway but not commit anything to the database, causing double-charges when you do run it.

 

Use Case

The Add Scheduled Payments script adds scheduled payments to a set of orders, using the customers' saved payment methods with the furthest expiration dates. The schedule for the payments is defined using execution fields, and the order list is generated using a BI query

 

Source File Format

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

 

info_outline

Information

Any Orders BI with the 'Order Number' as the result member can be used as the source file with the appropriate filter criteria to identify the orders that need the scheduled payments added. Use the Business Intelligence CSV Report Extract (text/csv) 'Extract Template' for the BI otherwise the script will not be able to parse the headers.

The following table outlines the field mapping:

 

Column

Required?

Source Column Header

Field Name

UI Field Location

1

Yes

Order Number

Order Number

Customer Services - Order|Summary page

 

How the Script Works

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

Condition

Action

Expected Results

The orders are identified by the source input.

The order is loaded and the customer's saved payment method with the furthest expiry date is used to add scheduled payments to the order, based on the scheduling criteria supplied by the execution fields at run time.

The order is updated with a the number of scheduled payments added to the order, based on the execution fields supplied at run time.

 

Creating and Executing the Data Management Job

Script Definition Configuration

The following tables outline the script definition configuration:

Script Definition Name: Add Scheduled Payments

Application Script: Add Scheduled Payments

Job Criteria Section

Source Name

Source Type

firstPaymentDate

The date of the first scheduled payment.

frequency

The frequency of the scheduled payments (monthly, weekly or quarterly).

scheduleEndType

When the scheduled payments will end (a specified date or number of payments).

lastPaymentDate

The date of the last scheduled payment if the 'End Date' end type is used.

numberOfPayments

The total number of recurring payments if the 'Number of Payments' end type is used.

 

Data Management Configuration

The following outlines the data management job configuration:

Data Management Job Name: Add Scheduled Payments

Script Definition: Add Scheduled Payments

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

 

Add Scheduled Payments_Schedule-7.28