Amazon Referrals
The Switchboard Amazon Referrals connector provides automated access to Amazon Affiliate revenue and order information.
Prerequisites
To configure access to the Switchboard Amazon Referrals connector, you need:
- Amazon AWS IAM Key/Secret Pair
- Bucket Path
- File Path
To obtain the pre-requisites, contact your Amazon Referrals Account Manager.
Scheduling
Amazon Referrals connector can be scheduled to run multiple times a day at a user-defined hour and timezone.
- To configure this schedule, use the delay_hours parameter.
- By default, the connector will run once at 6am PT. However, to ensure that data is downloaded as soon as possible after it is available, is recommended to use the period_hours: 1 parameter.
Switchboard Script Syntax
import amazon_referrals_earnings from {
type: "amazon_referrals_ng";
period_hours: 1;
key: "amazon_referrals_key";
regex: "site-20-earnings-report-2020.*\.tsv\.gz";
} using {
filename: string;
product_line : string;
item: string;
asin: string;
seller: string;
tracking_id: string;
date_shipped: datetime("MMMM d, YYYY");
price: float;
referral_fee_rate: string;
quantity: integer;
revenue: float;
earnings: float;
};
import amazon_referrals_earnings_subtags from {
type: "amazon_referrals_ng";
period_hours: 1;
key: "amazon_referrals_key";
regex: "site-20-earnings-report-subtags-2020.*\.tsv\.gz";
} using {
filename: string;
product_line : string;
seller: string;
associate_id: string;
date_shipped: datetime("MMMM d, YYYY");
price: float;
referral_fee_rate: string;
quantity: integer;
revenue: float;
earnings: float;
subtag: string;
};
import amazon_referrals_orders from {
type: "amazon_referrals_ng";
period_hours: 1;
key: "amazon_referrals_key";
regex: "site-20-orders-report-(2019|2020).*\.tsv\.gz";
} using {
product_line : string;
item: string;
asin: string;
date_ordered: datetime("MMMM d, YYYY");
link_type: string;
tracking_id: string;
direct_conversion_percentage: string;
direct_clicks: integer;
direct_ordered_quantity: integer;
indirect_ordered_quantity: integer;
total_ordered_quantity: integer;
};
import amazon_referrals_orders_subtags from {
type: "amazon_referrals_ng";
period_hours: 1;
key: "amazon_referrals_key";
regex: "site-20-orders-report-subtags-(2019|2020).*\.tsv\.gz";
} using {
filename: string;
product_line : string;
date_ordered: datetime("MMMM d, YYYY");
link_type: string;
associate_id: string;
direct_conversion_percentage: string;
direct_clicks: integer;
direct_ordered_quantity: integer;
indirect_ordered_quantity: integer;
total_ordered_quantity: string;
subtag: string;
};
import amazon_referrals_tracking from {
type: "amazon_referrals_ng";
period_hours: 1;
key: "amazon_referrals_key";
regex: "site-20-tracking-report-(2019|2020).*\.tsv\.gz";
} using {
filename: string;
associate_id: string;
clicks: integer;
items_ordered: integer;
items_shipped: integer;
blank: string;
shipped_revenue: float;
referral_fees: float;
ordered_revenue: float;
shipped_earnings: float;
};
Parameters
Parameter |
Description |
Required/Optional? |
regex |
A pattern that describes which files should be requested. |
Required |