[僅限PaaS]{class="badge informative" title="僅適用於雲端專案(Adobe管理的PaaS基礎結構)和內部部署專案的Adobe Commerce 。"}

進階抵用券程式碼分析

瞭解您的企業優惠券績效對於細分您的訂單以及更好地瞭解您的客戶來說是一種有趣的方式。 本主題將逐步帶您瞭解建立分析的步驟,以瞭解您透過使用抵用券而獲得哪些客戶、其如何執行以及追蹤一般抵用券的使用情況。

分析程式庫中的優惠券程式碼分析顯示關鍵量度

此分析包含進階計算資料行

快速入門

首先,您必須確保將下列欄同步至您的Data Warehouse。 如果沒有,請瀏覽至「Manage Data > Data Warehouse」並同步處理下列專案,繼續追蹤他們:

  • sales_flat_order ​資料表
  • 抵用券_代碼
  • base_discount_amount

計算欄

要建立的資料欄,不考慮來賓訂單原則:

  • sales\_flat\_order資料表

  • 已套用訂單優惠券?

    • Column type: Same Table => CALCULATION

    • Inputs:

      • Acoupon\_code

    • 資料型別: String

    • Calculation: A為Null然後No coupon否則Coupon結束的情況

  • [INPUT] customer_id — 優惠券代碼

    • Column type: Same Table => CALCULATION

    • Inputs:

      • Acustomer\_id
      • Bcoupon\_code
    • Datatype字串

    • Calculation: concat(A,' - ',B)

  • 含此優惠券的訂單數

    • Column type: Same Table => EVENT\_NUMBER
    • 事件擁有者: INPUT customer_id - coupon code
    • 事件排名: created\_at
    • Filters: Orders we count篩選器集

如果客體訂單不受支援,則要建立的其他欄位:

  • customer\_entity資料表

    • 客戶的第一個訂單包含優惠券? (優惠券/無優惠券)

    • Column type: Many to One => MAX

    • Path: sales\_flat\_order.customer\_id = customer\_entity.entity\_id

    • 選取column: Order has coupon applied? (Coupon/No coupon)

    • Filters:

      • AOrders we count
      • BCustomer's order number = 1
    • 客戶的首筆訂單優惠券

      • Column type: Many to One => MAX

      • Path: sales\_flat\_order.customer\_id = customer\_entity.entity\_id

      • 選取column: coupon\_code

      • Filter:

        • AOrders we count
        • BCustomer's order number = 1
    • 客戶使用的贈券期限數

      • Column type: Many to One => COUNT

      • Path: sales\_flat\_order.customer\_id = customer\_entity.entity\_id

      • Filter:

        • AOrders we count
        • BOrder has coupon applied? (Coupon/No coupon) = Coupon
    • 優惠券贏取客戶或非優惠券贏取客戶

      • Column type: Same Table => CALCULATION

      • Inputs:

        • ACustomer's first order included a coupon? (Coupon/No coupon)

      • 資料型別: String

      • Calculation: 案例,當A='Coupon'然後'Coupon acquisition customer'否則'Non-coupon acquisition customer'結束

    • 含優惠券的客戶​ 訂單百分比

      • Column type: Same Table => CALCULATION

      • Inputs:

        • AUser's lifetime number of coupons used
        • BUser's lifetime number of orders

      • 資料型別: Decimal

      • Calculation: 當A為null或B為null或B=0然後為null時,否則A/B結束

    • 客戶的抵用券使用量

      • Column type: Same Table => Calculation

      • Inputs:

        • APercent of customer's orders with coupon

      • 資料型別: String

      • Calculation: 當A為Null時為Null,當A=0時為「Nevere used coupon」,當A<0.5時為「Moverly full price」,當A=0.5時為「50/50」,當A=1時為「Coupons only」,當A>0.5時為「Moverly coupon」,否則為「Undefined」時為

  • sales\_flat\_order資料表

    • 客戶的第一個訂單包含優惠券? (優惠券/無優惠券)

      • Column type: One to Many => JOINED\_COLUMN
      • Path: sales\_flat\_order.customer\_id = customer\_entity.entity\_id
      • 選取column: Customer's first order included a coupon? (Coupon/No coupon)
        ^
    • 客戶的首筆訂單優惠券

      • Column type: One to Many => JOINED\_COLUMN
      • Path: sales\_flat\_order.customer\_id = customer\_entity.entity\_id
      • 選取column: Customer's first order coupon?

如果客體訂單不受支援,則要建立的其他欄位:

  • sales\_flat\_order資料表

    • 客戶的第一個訂單包含優惠券? (優惠券/無優惠券) - ​由分析人員建立,作為您的[優惠券分析]票證的一部分
    • 分析人員建立的客戶第一筆訂單優惠券​-,做為您[優惠券分析]票證的一部分
  • 分析人員建立作為[COUPON ANALYSIS]票證一部分的​- ​使用之客戶優惠券的期限數

  • 優惠券贏取客戶或非優惠券贏取客戶

    • Column type: Same Table => CALCULATION

    • Inputs:

      • ACustomer's first order included a coupon? (Coupon/No coupon)

    • 資料型別: String

    • Calculation: 案例,當A='Coupon'然後'Coupon acquisition customer'否則'Non-coupon acquisition customer'結束

  • 含優惠券的客戶​ 訂單百分比

    • Column type: Same Table => CALCULATION

    • Inputs:

      • AUser's lifetime number of coupons used
      • BUser's lifetime number of orders

    • 資料型別: Decimal

    • Calculation: 當A為null或B為null或B=0然後為null時,否則A/B結束

  • 客戶的抵用券使用量

    • Column type: Same Table => Calculation

    • Inputs:

      • APercent of customer's orders with coupon

    • 資料型別: String

    • Calculation: 當A為Null時為Null,當A=0時為「Nevere used coupon」,當A<0.5時為「Moverly full price」,當A=0.5時為「50/50」,當A=1時為「Coupons only」,當A>0.5時為「Moverly coupon」,否則為「Undefined」時為

量度

  • 優惠券折扣金額

    • Orders we count
    • Order has coupon applied? (Coupon/No coupon)= Coupon
  • sales\_flat\_order資料表中

  • 此量度執行​ 總和

  • discount\_amount欄上

  • created\_at時間戳記排序

  • Filter:

  • 已使用的抵用券數目

    • Orders we count
    • Order has coupon applied? (Coupon/No coupon)= Coupon
  • sales\_flat\_order資料表中

  • 此量度執行​ 計數

  • entity\_id欄上

  • created\_at時間戳記排序

  • Filter:

NOTE
在建立新報表之前,請務必將所有新欄新增為量度的維度。

報表

  • 已取得優惠券與已取得非優惠券客戶的​ %

    • Metric: New customers
  • 量度ACoupon acquisitions

  • Time period: All time


  • 間隔: None

  • Group by: Coupon acquisitions customerNon coupon acquisition customer


  • 圖表型別: Pie

  • 已取得優惠券與未取得優惠券的客戶數目

    • Metric: New customers
  • 量度A: Coupon acquisitions

  • Time period: All time

  • Interval: By Month

  • Group by: Coupon acquisitions customerNon coupon acquisition customer

  • Chart type: Stacked column

  • 平均期限收入:優惠券常見問答集。 (90+天存留期)

    • Metric: Average lifetime revenue
    • Filter:
      • 客戶的第一筆訂單包含優惠券(優惠券/無優惠券) =優惠券
  • 量度AAverage lifetime revenue (at least 3 months age)

  • Time period: X years ago to 90 days ago


  • 間隔: None


  • 圖表型別: Scalar

  • 平均存留期收入:無優惠券常見問答集。 (90+天存留期)

    • Metric:平均期限收入
    • Filter:
      • 客戶的第一筆訂單包含優惠券(優惠券/無優惠券) =無優惠券
  • 量度AAverage lifetime revenue (at least 3 months age)

  • Time period: X years ago to 90 days ago


  • 間隔: None


  • 圖表型別: Scalar

  • 依第一筆贈券的平均期限收入

    • Metric: Average lifetime revenue
  • 量度AAverage lifetime revenue

  • Time period: All time


  • 間隔: None

  • Group by: Customer's first order's coupon


  • 圖表型別: Column

NOTE
如果您有許多抵用券代碼(許多使用者端都有),您想要套用前/後(例如依平均期限收入排序的前10名)
  • 重複訂購可能性:優惠券取得

    • Metric: Number of orders

    • Filter:

      • 客戶的第一筆訂單包含優惠券(優惠券/無優惠券) =優惠券
    • Metric: Number of orders

    • Filter:

      • 客戶的第一筆訂單包含優惠券(優惠券/無優惠券) =優惠券
      • 客戶的上次訂單是哪個? =否

    • 公式: B/A

    • Format: Percentage %

    • Customer's by lifetime orders圖表選取統計顯著數字。 檢視圖表時,一個好的規則是尋找貯體中具有30個或更多客戶的訂單編號。 根據您的資料集,這可能是很大的數字,因此歡迎新增1-10。

  • 量度ANumber of orders

  • 量度BNumber of non last orders

  • Formula: Repeat order probability

  • Time period: All time


  • 間隔: None

  • Group by: Customer's order number

  • Chart type: Bar chart

  • 重複訂購機率:非優惠券收購

    • Metric: Number of orders

    • Filter:

      • 客戶的第一筆訂單包含優惠券(優惠券/無優惠券) =無優惠券
    • Metric: Number of orders

    • Filter:

      • 客戶的第一筆訂單包含優惠券(優惠券/無優惠券) =無優惠券
      • 客戶的上次訂單是哪個? =否

    • 公式: B/A

    • Format: Percentage %

    • Customer's by lifetime orders圖表或1-5中選取統計顯著數字。

  • 量度ANumber of orders

  • 量度BNumber of non last orders

  • Formula: Repeat order probability

  • Time period: All time


  • 間隔: None

  • Group by: Customer's order number

  • Chart type: Bar chart

  • 已取得優惠券的客戶優惠券使用率(重複訂購)

    • Metric: New customers

    • Filter:

      • 優惠券取得客戶或非優惠券取得客戶=優惠券取得
    • Metric: Number of orders

    • Filter:

      • 客戶的訂單編號> 1
      • 客戶的第一筆訂單是否包含抵用券? (抵用券/無抵用券) =抵用券
    • Metric:Number of orders

    • Filter:

      • 客戶的訂單編號> 1
      • 客戶的第一筆訂單是否包含抵用券? (抵用券/無抵用券) =抵用券
      • 已套用訂單優惠券? (抵用券/無抵用券) =抵用券

    • 公式: C/B

    • Format: Percentage %

  • 量度ACoupon-acquired customers

  • 量度BNumber of repeat orders

  • 量度CNumber of repeat orders with coupon

  • Formula: % of repeat orders with coupon

  • Time period: All time


  • 間隔: None


  • 圖表型別: Table (可以調換此表格以提供更好的視覺效果)

  • 非優惠券取得客戶的優惠券使用率(重複訂購)

    • Metric: New customers

    • Filter:

      • 優惠券取得客戶或非優惠券取得客戶=非優惠券取得
    • Metric: Number of orders

    • Filter:

      • 客戶的訂單編號> 1
      • 客戶的第一筆訂單是否包含抵用券? (抵用券/無抵用券) =無抵用券
    • Metric: Number of orders

    • Filter:

      • 客戶的訂單編號> 1
      • 客戶的第一筆訂單是否包含抵用券? (抵用券/無抵用券) =無抵用券
      • 已套用訂單優惠券? (抵用券/無抵用券) =抵用券

    • 公式: C/B

    • Format: Percentage %

  • 量度ANon-coupon-acquired customers

  • 量度BNumber of repeat orders

  • 量度CNumber of repeat orders with coupon

  • Formula: % of repeat orders with coupon

  • Time period: All time


  • 間隔: None


  • 圖表型別: Table (可以調換此表格以提供更好的視覺效果)

  • 優惠券使用詳細資料(首次訂購)

    • Metric: Number of orders

    • Filter:

      • 客戶的訂單編號= 1
      • 含此抵用券的訂單數> 10

    • 公制: Revenue

    • Filter:

      • 客戶的訂單編號= 1
      • 含此抵用券的訂單數> 10
    • Metric: Coupon discount amount

    • Filter:

      • 客戶的訂單編號= 1
      • 含此抵用券的訂單數> 10
    • Formula: B-C (如果C是負數);B+C (如果C是正數)


    • 格式: Currency

    • Metric: Average order value

    • Filter:

      • 客戶的訂單編號= 1
      • 含此抵用券的訂單數> 10
  • 量度AFirst time orders (FTO)

  • 量度BRevenue from FTO

  • 量度CDiscounts applied to FTO

  • Formula: Gross revenue from FTO

  • 量度EAverage order value for FTO

  • Time period: All time


  • 間隔: None

  • Group by: coupon code


  • 圖表型別: Table

NOTE
「具有此抵用券的訂單數」的數量10為任意數。 您可以針對此篩選器使用最適當的數量。
  • 含優惠券的訂單數(所有時間)

    • Metric: Number of coupons used
  • 量度ANumber or orders with coupon

  • Time period: All time


  • 間隔: None


  • 圖表型別: Scalar

  • 含優惠券的訂單淨收入(所有時間)


    • 公制: Revenue
    • Filter:
      • 已套用訂單優惠券? (抵用券/無抵用券) =抵用券
  • 量度ANet revenue from orders with coupons

  • Time period: All time


  • 間隔: None


  • 圖表型別: Scalar

  • 優惠券折扣(所有時間)

    • Metric: Number of coupons used
  • 量度ACoupon discount amount

  • Time period: All time


  • 間隔: None


  • 圖表型別: Scalar

  • 含和不含抵用券的訂單數

    • Metric: Number of orders
  • 量度ANumber of orders

  • Time period: Last 24 months


  • 間隔: None

  • Group by: Order has coupon applied? (Coupon/No coupon)

  • Chart type: Stacked column

  • 重複使用者之間的優惠券使用量

    • Metric: New customers
    • Filter:
      • 客戶期限訂單數> 1
  • 量度ANew customers

  • Time period: All time


  • 間隔: None

  • Group by: Customer's coupon usage


  • 圖表型別: Pie

  • 優惠券使用詳細資料

    • Metric: Number of orders with coupon

    • Filter:

      • 含此抵用券的訂單數> 10

    • 公制: Revenue

    • Filter:

      • 含此抵用券的訂單數> 10
    • Metric: Coupon discount amount

    • Filter:

      • 含此抵用券的訂單數> 10
    • Formula: B-C (如果C為負數); B+C (如果C為正數)


    • 格式: Currency

    • Formula: C/(B-C) (如果C為負數); C/(B+C) (如果C為正數)


    • 格式: Percentage

    • Metric: Average order value

    • Filter:

      • 含此抵用券的訂單數> 10

    • 公式: C/A


    • 格式: Currency

    • Metric: Distinct buyers

    • Filter:

      • 含此抵用券的訂單數> 10
  • 量度ANumber of orders

  • 量度BNet revenue from orders

  • 量度CTotal discounts applied

  • Formula: Gross revenue

  • Formula: % discounted

  • 量度FAverage net order value

  • Formula: Average order discount

  • 量度HDistinct buyers

  • Time period: All time


  • 間隔: None

  • Group by: coupon code


  • 圖表型別: Table

NOTE
「具有此抵用券的訂單數」的數量10為任意數。 您可以針對此篩選器使用最適當的數量。

編譯所有報表後,您可以視需要在控制面板上組織報表。 結果看起來可能像頁面頂端的影像。

如果您在建立此分析時遇到任何問題,或只是想與專業服務團隊互動,請聯絡支援人員

NOTE
截至Adobe Commerce 2.4.7,客戶可以使用​ quote_coupons ​和​ sales_order_coupons ​資料表,深入瞭解客戶如何使用多張優惠券。

多折價券分析的資料表關係圖

recommendation-more-help
e1f8a7e8-8cc7-4c99-9697-b1daa1d66dbc