Skip to main content
All CollectionseCommerce
Price Per Product
Price Per Product

Guide to setting up Revenue and Payout based on Product SKUs

Genny avatar
Written by Genny
Updated over a month ago

Table of Contents


Overview

This guide will walk you through how to configure the Revenue and Payout on an Offer to be based on Product SKUs.

Price Per Product can be enabled in your account upon request - please contact the Customer Success team.


A How-To Guide


Step #1

  • When creating or editing the Offer you have selected for which to configure revenue and payout based on Per Product SKU, click the Revenue & Payout tab to configure the base Earning and Payout types.

Please note that the base Payout and Revenue will be used if no matching Product SKUs are found in Custom Settings.

  • See below the options for earnings types and their descriptions.

Base Revenue Type

Description

Base Payout

Type

Description

RPA (Price Per Product)

Revenue per Conversion (Price Per Product)

CPA (Price Per Product)

Cost per Conversion

RPA/RPS (Price Per Product)

Revenue per Conversion (Price Per Product)

+
% Revenue per Sale (Price per Product)

CPA/CPS (Price Per Product)

Cost per Conversion

+

% Cost per Sale (Price Per Product)

RPS (Price Per Product)

% Revenue per Sale (Price per Product)

CPS (Price Per Product)

% Cost per Sale (Price Per Product)

PRV (Price Per Product)

% of Revenue (Price Per Product)

  • Click Save.

Step #2

  • Navigate to the Custom Settings tab and click the vertical dots on the Custom Custom Payout Revenue Settings card, and select Add to configure your Product SKUs.

Please note the banner displayed in the offer view which appears if the offer is using Price per SKU and there is not a custom setting configured as Price per SKU.


Step #3

  • Configure the settings and conditions of the custom rule.

Please [Click Here] for more details on other available Custom Settings fields.

Step #3A

  • Click the Products tab and turn on the toggle to Enable SKU.

  • Specify and define the SKUs that this Custom Setting should be applied to. Multiple Product SKUs can be added and must be separated by line.

  • Click Add.


PLEASE NOTE

If the Offer is set to Price per SKU and the incoming conversion is not an order (defined by having no “order” parameter in the postback), the Payout and Revenue for the conversion will be $0.

The base Revenue and Payout values will be used in the following scenarios:

  1. No matching SKU defined in Custom Settings

  2. No Custom Payout defined (only Custom Revenue will be applied)

  3. Empty SKU or SKU not defined in Shopify


Shopping Cart Integrations

The following eCommerce integrations will automatically allow for Price Per Product capabilities:

  • Shopify

  • Woocommerce

  • BigCommerce

  • Clickfunnels

Order Object Structure

The order object should be structured as follows:

{

"oid": "ORDER_ID",

"amt": "ORDER_AMOUNT",

"bs": "ORDER_STATE",

"bc": "ORDER_COUNTRY",

"cc": "COUPON_CODE",

"items": [{

"ps": "PRODUCT_1_SKU",

"p": "PRODUCT_1_PRICE",

"qty": PRODUCT_1_QUANTITY

},{

"ps": "PRODUCT_2_SKU",

"p": "PRODUCT_2_PRICE",

"qty": PRODUCT_2_QUANTITY

}]

}

Here's what each field represents:

  • oid: The unique identifier for the order

  • amt: The total amount of the order

  • bs: The billing state of the order

  • bc: The billing country of the order

  • cc: Any coupon code used for the order

  • items: An array of products in the order, where each product has:

    • ps: The SKU (Stock Keeping Unit) of the product

    • p: The price of the product

    • qty: The quantity of the product ordered

For all other shopping carts, the following needs to be passed in the order object of the code script in the store’s website.

Example: One Item

{
"oid": 4422034653339,
"amt": "0.00",
"bs": "",
"bc": "",
"cc": "",
"items": [{
"ps": "pete-2020-bobblehead",
"p": "0.00",
"qty": 1
}]
}

Example: Two Items

{
"oid": 4422034653339,
"amt": "5.00",
"bs": "",
"bc": "",
"cc": "",
"items": [{
"ps": "bobble2",
"p": "3.00",
"qty": 1
},{
"ps": "bobble1",
"p": "1.00",
"qty": 2
}]
}

Using Price Per Product and Discounts with Shopify

Everflow will apply revenue and payout settings to the discounted amount using the following formula: price = (cost * quantity) - discount

Discounts must be turned on for them to be processed. This is done in the Shopify integration configuration. Enable reconciliation, then enable discounts.

The discount amounts are relevant for the settings that require percentages only.

For example, the following combos and settings will be applied on the discounted amount when used in conjunction with RPS (Price Per Product).

  • RPS (Price Per Product) & CPS (Price Per Product),

  • RPA/RPS (Price Per Product) & CPA/CPS (Price Per Product),

  • PRV (Price Per Product)

The discount code used is displayed in the Coupon Code column on the Conversion Report.

Example A

Base Offer Revenue: 75% RPS (Price Per Product)

Base Offer Payout: 10% CPS (Price Per Product)

Custom Setting:

RPS (Price Per Product) & 25% CPS (Price Per Product) with

Product SKU variable “matches”: 123456

  • Customer “orders” the following items:

    • Pants $10 with SKU 123456

    • Shirt $10 with SKU 998877

    • 50% Discount is applied

  • Result:

    • The pants will have the Custom Setting applied, on the matching SKUs for $1.25 RPS/CPS with discount applied.

    • The shirt will have base setting applied, on the default custom setting for $3.75 RPS and $0.5 CPS with discount applied

Example B

Base Offer Revenue: 75% RPS (Price Per Product)

Base Offer Payout: 10% CPS (Price Per Product)

Custom Setting #1:

RPS (Price Per Product) & 50% CPS (Price Per Product) with no SKU variable

Custom Setting #2:

RPS (Price Per Product) & 25% CPS (Price Per Product) with

SKU variable “matches” 123456

  • Customer has conversion without order parameter for the following items:

    • Pants $10 with SKU 123456

    • Shirt $10 with SKU 998877

    • Socks $10 with no SKU

  • Result:

    • Due to the order parameter not getting passed on the conversion postback the RPS will be $0 & CPS will be $0.


Using Price Per Product and Discounts with WooCommerce

  • Please use the following code on your checkout page with the woocommerce_thankyou action:

add_action( 'woocommerce_thankyou', 'my_custom_tracking' );

function my_custom_tracking( $order_id ) {
$order = wc_get_order( $order_id );

//Everflow order objects
$efOrder = array();
$efOrder['items'] = array();
$efOrder['oid'] = $order_id;
$efOrder['amt'] = $order->get_total();
$efOrder['bs'] = $order->get_billing_state();
$efOrder['bc'] = $order->get_billing_country();

$coupons = "";
$couponCount = 0;
foreach ($order->get_used_coupons() as $coupon) {
$couponCount++;
if($couponCount > 1) { // do not add comma unless more than one coupon
$coupons .= ',';
}
$coupons .= $coupon;
}
$efOrder['cc'] = $coupons;

// This is how to grab line items from the order
$line_items = $order->get_items();

// This loops over line items
$efItems = array();
foreach ( $line_items as $item ) {
$efItem = array();
$product = $order->get_product_from_item( $item );
$efItem['vs'] = '';
$efItem['ps'] = '';
if ($product->get_type() === 'variation') {
$efItem['vs'] = $product->get_sku();
} else {
$efItem['ps'] = $product->get_sku();
}
$efItem['qty'] = $item['qty'];
$efItem['p'] = $order->get_line_total( $item, true, true );
$efItems[] = $efItem;
}
$efOrder['items'] = $efItems;

$javascriptCode = '<script type="text/javascript" src="https://www.[YOUR_DOMAIN].com/scripts/sdk/everflow.js"></script>

<script type="text/javascript">
EF.conversion({
aid: [YOUR_AID],
amount: '.($order->get_total() - $order->get_shipping_total()).',
coupon_code: "'.$coupons.'",
email: "'.$order->billing_email.'",
order: '.json_encode($efOrder).',
});
</script>';

echo $javascriptCode;
}

Did this answer your question?