Search that Leads to a Sale - BeastMode or ETL
I have 2 data sets. One is showing all of the search terms entered on our eCommerce site, along with the logged-in user's account info. I want to see if any of these search terms match with products sold in my second data set, which is all of the sales entered in our ERP. The intent is to see if an online search may have led to an offline purchase. The basic criteria is:
Customer searches online for Product X
For some reason, does not buy online
Customer instead places a PO through a traditional channel (email, phone order, etc.) that is entered in our ERP
*If this search term matches an ordered item within a 7-day window, we want to flag it.
Essentially, for every search, I want to check our sales data from the next 7 days for matches on the search term and customer number, and isolate those records.
I did this in PowerBi years ago, but i unfortunately lost the work. Trying to determine if this is an ETL and/or BeastMode thing.
Comments
-
Since this is two datasets, it's definitely an ETL thing (probably SQL, not Magic ETL).
Like you said, you'd want to review each search by person and product and time window to see if there's a match in the sales records.
Pseudo SQL:
SELECT
search.search_id
,search.user_account_id
,search.date
,search.product_id
,CASE WHEN sale.transaction_id IS NOT NULL THEN 'Purchased' ELSE 'Not Purchased' as flag
,sale.transaction_id
,sale.date
FROM
ecommerce_searches as search
LEFT OUTER JOIN erp_sales as sale
ON search.user_account_id = sale.account_id
AND search.product_id = sale.product_id
AND search.date BETWEEN sale.date - 7 AND sale.dateThe assumption here (one of them, anyway) is that you're able to identify products searched online with actual products from your product line.
Aaron
MajorDomo @ Merit Medical
**Say "Thanks" by clicking the heart in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 58 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 395 Distribute
- 113 Domo Everywhere
- 276 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive