Flow Zone Reference : [Sales Lead Features](flow_zone:4UhtPNr)

With a complete and clean dataset, we are ready to create our outcome of interest - sales lead. 

![Screen Shot 2022-01-06 at 10.55.56 AM.png](sUTd0qDzNDmz)

What does this mean? To understand the relationship between marketing outreach and sales we need to look at the change in sales  _after_ a given outreach behavior occurs. This means the effect of a marketing campaign that occurs in week 1  can only be seen on sales in the following weeks - not in the same week that the outreach occurs.

![Screen Shot 2021-12-21 at 2.49.13 PM.png](XsKXawT07WFT)

In order to associate future sales with a given week's marketing campaign, we will use a window recipe to create a frame that groups sales by parent_account_id and product_id. Then in the 'aggregations' tab, we can use the Lead operation to associate future sales with a given week of marketing activities. It is possible that some campaigns do not take effect until after 2 weeks, so this value can be adjusted as needed to account for a longer lead time. 

![Screen Shot 2021-12-21 at 2.49.51 PM.png](FxExBksgRy7k)

After creating and cleaning the sales lead features with a prepare recipe, we can join the sales information onto the weekly marketing data before moving into the modeling phase.


