Introduce how to display the ranking of the number of purchases / purchase price on the site.

  • It is assumed that the product master has been imported to Datahub.
    • If you have n’t imported yethere.Please import the product master referring to the article.

Set up the query

  • Datahub administration screen → The screen changes to "Query" screen.
  • Click "Create"-"Create from Collection" on the top left
  • やりたいことから探す→「ランキングを表示したい」から「商品購入数/購入金額のランキング」を選択
    null
  • Set the following from parameter setting
    • Extraction period (default 7 days)
    • Data set ID of product master
    • Product master table ID
    • Record lifetime (h) (default is 24 hours) when linking action tables

null

  • Check whether the result is returned by executing “Query” in the upper right.
please note

Make sure that the query results are within 200,000 records. (The maximum number of records in the action table is 200,000 records, so data cannot be exported to the action table if it exceeds 200,000 records.)

Checkpoints when query results are not returned

  • Is the event name and schema sent in the KARTE tag set correctly?
    • In realizing the recommendation,view_itembuyThe event must be sent to KARTE correctly.
      • Check if the event is sent correctly from the global menu “Knowing Customers” → “Events”.
  • Does it conform to the product master format?
    • Check if field names and data types are linked according to the format.
      • The product master format ishere.
  • Is the linked data value correct?
    • You can check the imported data from “Preset”, “Table information”, etc. of Dataset → Imported table.

Create action table

  • Click on "Create" → "Create empty table" at the top right of the action table of the global menu
  • Make the following settings and click "Create"
    • Table ID: Specify any table name (in the example, ranking_weekly)
    • Schema setting: Specify the schema of the query result as follows
    • Authority: Since this time only for reference, check "Reference from widget"
    • mode:
      • No filtering or filtering with a single condition: general
      • When filtering by multiple conditions: flexible

Schema setting of action table

Field name Type
item_id (primary key) string
name string
brand_name string
price Number
display_price string
image string
url string
l_category_cd string
s_category_cd string
brand_cd string
sex_cd string
quantity_rank Number
amount_rank Number
expired_at Timestamp
You can scroll

Export query results to action table

  • Click "Create" in the upper right of the job flow screen on the global menu
  • Set the following from the job setting screen, click "Save and complete" in the upper right

Job settings

item Contents
Job name Weekly ranking results to action table
Job type Import from data table
Export source The query result created earlier
Export destination Select the action table created earlier
You can scroll

Select execution method

  • Check "Enable schedule execution"
  • Check "Enable repetitive execution"
  • Set execution frequency
    • We recommend weekly degree of coordination frequency.

null

Job Flow Settings

  • "Archive after job execution is finished" is not checked
  • Job flow name: optional
    • If there is only one job, we recommend "diverting the first job name".
  • Click "Run Now" at the top right to execute the job.
    • ※ It will take about 5 minutes for the job to finish.
  • Confirm that the job is "Executed".

Create action table queries

  • Select the created action table and click "Create" in the upper right of the screen
  • Perform the following settings
  • Query name: optional
  • Extraction condition:
    • Limit: 20
    • Filter: Please specify the condition you want to filter.
      • Example: When filtering by brand only
        • brand_cd = # {brand_cd}
      • Example: If you want to filter by brand, large category, small category, gender
        • brand_cd = # {brand_cd}
        • l_category_cd = # {l_category_cd}
        • s_category_cd = # {s_category_cd}
        • sex_cd = # {sex_cd}
        • ※ If you want to filter by multiple conditions, please set the mode of the action table to "flexible".
    • Sort:quantity_rankoramount_rank
      • ascending order

This completes the creation of the action table query.

null

Set up Scenario

  • Scenario creation screen and select a template for recommendation.

    • Template (3 types)
      null
      * If the template is not displayed, contact your sales representative.
      • KARTE recommendation (ranking) rank-mr
        • After displaying a certain number of products, use the “more” button to display more products at the bottom.
      • KARTE recommendation (ranking) rank-slk
        • After displaying a certain number of products, display more products on the slide (carousel)
      • KARTE recommendation (ranking) rank-mdl
        • Display products in modal.
  • Set the following from "Basic" on the Scenario detail screen.

    • Action table:

      • Action table name: Specify the action table created above
      • Action table query name: Specify the action table query name created above
        null
    • filtering:

      • Whether to directly enter a value for each item (brand, child category, parent category, gender) that you want to narrow down in the action table frameUser information variableEnter the variable set in step

        • Example: When narrowing down by brand value: brand12345
          null

        • Example: When filtering by brand_cd of the _view_item event

          • User information variable
            null

          • filter
            null

      • When you want to change filtering items

        • Above ④Create action table queriesChange the extraction condition> Filter set in.
          • Example: Brandbrand_cdTEST field referencetest_cdIf you want to change
            • brand_cd = # {test_cd}
    • Data management:

      • User information variable

        • Purchased items (variable name: boughtItems): Setting not to display purchased items in the recommendation

          • All period> Purchase> Product ID> Last 30
          • Default value:"[]"
          • Output as JSON: ON
            null
        • Cart products (variable name: cartItems): Settings that do not display the products in the cart in the recommendations

          • Latest Session> Cart> item_ids> Last 30
          • Default value:"[]"
          • Output as JSON: ON
            null
please note

Filtering items are designed assuming that they are specified in the character string type. If you want to filter by a data type other than character string, directly rewrite the logic in the template.

The main settings are now complete.

Depending on the type of template, the number to be displayed (maximum display number, minimum display number, etc.) can be set. In addition, it is possible to change the design freely by customizing in the same way as other Scenario.

  • Perform the test delivery and confirm that the data put in the action table is displayed.
  • If it is not displayed, please edit from the Scenario edit screen -> customize.
  • For details, please check the following documents

Please make delivery settings with the same flow as the conventional Scenario .