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
- 296 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 614 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 729 Beast Mode
- 53 App Studio
- 40 Variables
- 677 Automate
- 173 Apps
- 451 APIs & Domo Developer
- 45 Workflows
- 8 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 121 Manage
- 118 Governance & Security
- Domo Community Gallery
- 32 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive