How do I develop a system to Recommend a marketing channel using data science? - data-science

I am working on a data science challenge. I would like some help on how to proceed in developing my solution..
A snapshot of my dataset is shown below:
This dataset is collected by a drug making company trying to sell its drug to doctors of different specializations.
The drug company has made promotional activity for its brand
The promotional activity has included calls made, emails sent and faxes sent. The dataset shows how many calls have been made ('Calls Made' column), how many calls were successfully completed ('Calls Successfully Completed' column), how many emails were sent ('Emails Sent' column), how many emails were opened ('Emails Opened' column), how many faxes were sent ('Faxes Sent' column).
Brand 1 is the brand of the drug company. Brand 2 is the brand of its competitor.
The dataset shows how many sales have been made for various brands.
Brand 1 Sales (Company's brand) - number of sales of the drug company's brand
Brand 2 Sales (Competitor brand)- number of sales of the competitor's brand
Total Branded Market Sales - number of sales of the all brands (from all companies selling branded drugs) in the market
Total Market (Branded + Unbranded) sales - number of sales of all branded and unbranded drugs
My task is to develop a ML system using this dataset that will recommend which of the three channels to use (calls/emails/fax) for future promotional activity.
How do I develop such a system? My understanding is that this is a classification problem with three classes (calls/emails/fax). For a prospective customer, I have to classify him/her into one of the three classes that would indicate what channel to use.
What kind of feature engineering should I do? What model can I use?

I have developed a solution for this problem. I clustered the dataset into three clusters (call, email, fax) and assigned each customer categorized into a cluster to the corresponding marketing channel. I calculated the channel affinity score using the distance of the customer data point to the cluster centroid.
The solution is uploaded to a github repo:
https://github.com/skumaravel/Marketing-Channel-Recommendation-System
It contains a jupyter notebook containing the python code for the solution, the dataset and a pdf report explaining my approach.

Related

Product pricing based on price zones for a store-pickup grocery chain website

I am in the process of building a e-commerce website for a small local grocery chain to allow their customers to order online and pickup at store. I will be integrating with the in-store POS system to pull the category & product data and push back the order data.
As I am new to Prestashop I am wondering if the following setup is possible out-of-the-box:
The POS system uses price zones which can be shared by stores (e.g. price_zone_1 is used by the 3 stores in San Francisco for pricing, price_zone_2 is used by 2 stores in Los Angeles for pricing).
The POS system have a pricezone_productprice table
product_id pricezone_id price
1 1 14
1 2 12
Then there is store_stock table
product_id store_id stock
1 1 98
1 2 45
And the store table has a pricezone foreign key that ties everything together
store_id pricezone_id
1 2
2 1
I need to have a similar setup on the Prestashop side to exchange data and display correct pricing and stock information for different stores.
Is such a structure/feature available out-of-the-box? If not are you aware of any module that might help with this? And finally if nothing is available how feasible do you think this is to develop under prestashop?
I explored multistore feature but as far as I understand that would not do what I am looking for as it separates order history, etc. I want customers to be able to see their order history from different stores in one page.
This might deserve an entire Override for Product Class with a Module. But honestly, you should better do a multishop website based on the zone you want to deliver, then ask the client when he enters the website.
It will cost you 10 minutes and fine tuning instead of hours of dev and lot's of debug.
If you still want to use a Module, just overide Product class and following methods : getPriceStatic and getProductPrice
NB : Another idea would be to consider price by ... country and tell each as a separate one. But this can be dangerous :).

Prestashop, synchronize the local stores with a global store

I have 3 local stores, each stores have one prestashop e-commerce.
65% of their products are the same and the rest changes regarding to the store.
I would like to find the way to create a fourth prestashop e-commerce which sell the products of all the 3 stores, manage the stock and notify the different stores when an order is created.
Each store has to manage their special products ( descriptions, pictures and prices). For the products which are the same between each stores, the price, description and pictures are exactly the same.
Is it possible?
Thanks!!
EDIT
By local stores, I mean real physical stores. These stores impemented in three differents places have a online store on the subdomaine : mydomaine.com/city1 , mydomaine.com/city2 , mydomaine.com/city3.
For instance the store 1 has the product 1, the store 2 the product 2, the store 3 the product 3.
And the online site 4 should have the products 1,2,3.
I would like to create a fourth online story which regroup the products of the three other online stores. The stock on the fourth online store for the same products, should be the sum of the product available one each local store.
For instance, the store based in the city 1, could add a new special product ( price, description, stock) in its online store ( mydomaine.com/city1). ( special product : product only sold in one location ) This product should be directly accessible on the fourth online store ( the local managers have no access to the fourth online store). The thorny point is here : if a customer order on the fourth online store, the local stores which have the products involved in the customer order should be notified to send the products. And If a product is sold on a local online store ( for instance, mydomaine.com/city2) the stock of the fourth online store should be updated.
The stock for each online store is updated everyday to match the store stocks. For instance, the store in the city 1 will update every day the stocks of their products available online regarding to their sales of the day in their brick and mortgage store.
Prestashop includes a MultiStore functionality.
You can create a single website with 4 different shops. You then can import all your products and link those products to your shops (You can link a product to one or more shops). You can manage prices and stocks independently for each shops as well.
Please let me know if you have more questions on the subject.
Here are some links:
Managing Multiple Shops
Advanced Stock Management

Different Between Char Of Account And Analytical Account in ODOO (Formally OpenERP)

I have hear from the some where the char of account is used based on the different country it means that the char of account used based on different different country and analytical account is used as in service type of products.
I don't know am i right or wrong.
Please clarify me in depth which situation we are using the chart of account and which is not and which situation we are using the analytical account in ODOO (Formally) and which is not.
In principle, accounts that made up the chart of accounts are taken into general ledger posting i.e used to prepare BS, P/L etc, while the analytical accounting are mainly used only for companies internal use and doesn't affect anything in real accounting.
The general accounting system is a legal obligation. It must conform to certain accounting principles and must represent a fair picture of the financial situation of the company by producing a balance sheet and a profit and loss statement. Its foundation is the Chart of Accounts, made up of eight classes. Classes 1-5 are balance sheet accounts and classes 6 and 7 (expenses and revenues) are used for the profit and loss statement. All journals and accounts post to the General Ledger.
The second accounting system used in some countries is called Analytical Accounting. Its main purpose is to track expense and revenue accounts by categories in order to derive profit and loss by activity. Its foundation is a separate Chart of Accounts made up of a single class (class 9). Its journals and accounts post to a separate ledger (the Analytical Ledger.)
Some European countries use two types of accounting systems. (The United States and most other countries use only one.)
The chart of accounting will differ from country to country. For example US uses Account receivable and Account payable accounts which is equal to Debtors and Creditors accounts in Indian accounting. So Odoo keeps the chart of account based on the country.
Chart of Accounts are real accounts used for legal Purpose but Analytic Accounts are Just like same but only for Analysis Purpose like Budget Management Purpose etc.

How does the backend of a e-commerce looks

I would like to know how does e-commerce sites maintain their databases?
Let say they are selling a product name X from a marchant M
Now the merchant increases or decreases the cost of the item. It is manually edited in the e-commerse backend ? Is this part automated?
If there is an id associated with the item, is id given by the merchant or the e-commerce site?
There can be 10 same product items provided by 10 different merchant. Now the specification of the product is same but the amount varies from each merchant. if let say every merchant change the cost of the item and tell us the cost. How can we in automated fashion edit the backend in such a situation
The shop owner with the website is adjusting their prices independently of the wholesaler. This can be done manually in an online product admin interface, or it can be done through some kind of data feed of all products like XML or CVS. The data feed can be coming directly from a retail point of sale system. If the wholesaler raises the prices - the shop owner still has stock on hand of the product they bought at the previous price. When the shop owner takes delivery of the new stock and enters that inventory into the system - at that point they would adjust the prices.
A product has a UPC code (or EAN if in europe) which is universal for that product. For example all products on Amazon have a UPC code which is how they organize different sellers for the same product
VERSUS a SKU or Product ID - which is unique to the shop owner. That is what the shop owner uses to track inventory and prices. The universal UPC plus unique SKU is how amazon determines the product that is sold.
In your last example - you are talking about functioning as a "marketplace" like Amazon.com Amazon lets merchants determine their own prices - but very important to know the price is ranked as price + shipping cost. Because some merchants will lower the product price to try and come out on top but then they inflate the shipping cost to make up for it.

Payroll, OpenERP 7, U.S. payroll taxes

I have searched and searched but to no avail... has anybody created a payroll module for a U.S. based company? It seems that most of what I've seen is that companies are using payroll companies to process their payroll, but I haven't found anybody using OpenERP 7 for hourly employees with the U.S. tax system (it's not a flat tax rate).
It seems like what I may have to do, is create tax table in PostgresQL for federal, state, and local taxes, then reference those tables in the deduction calculation. I read one article on using the vendors/ or suppliers module and implementing a tax structure from that, but then again, those are still flat rates. I have to believe someone else has done this for the U.S. payroll system, and probably done it better than I could as I am fairly new to OpenERP.
I am in the process of doing something similar for LedgerSMB. The thing is that doing this on an open source model is extremely painful business-model-wise. I am working on solutions to that part but that's outside the scope of your question.
In general many US taxes are set up in marginal rates with certain minimums and maximums. For example income tax withholding is a set of marginal rates within tax brackets. Same with FICA and FUMA, but FICA taxes are capped at a certain level, so a simple tax table with rates, minimums, maximums, etc. and then a way of handling deductions to determine the correct line may be sufficient.
But users of most open source ERP's use third party services for payroll.
I have worked in an ERP. How we did is just calculate the FIT in yearly for all the employee and subtract the withholding amount with multiples.
FIT => Taxable Wages Yearly - (No.of withholding(Exemption))
Do the process as per the revision based on single or married only for annually. No need to update all the tables.
Then,
Divided it based on the frequency from the employee table information
EX:
for monthly : FIT/12
for daily : FIT/365
For SIT you have to use based on the document in the state usine case function.