Ryan (ryan@themedialab.agency)
2024-07-02 13:14:56

This is Production Lambda Application.

https://us-east-1.console.aws.amazon.com/lambda/home?region=us-east-1#/applications/dailyfinancials-rebuild-py311

Shane has a branch in GitHub where he improved the Calculate_Performance (stage 1) to be better Python coding, removed hardcodes to MB names, initials and platforms, and was working on the next two items:

• Access TIP AWS Postgres DB table called public.financiallog to run through some logic to assign media buyers to leads that do not have an S1 or lpleadid (referrals) • If cannot resolve S1 to a media buyer, put "ERROR" in S1 or lpleadid field. • Sum up the contracts by media buyer, by day, by case type, looking up their revenue in Leadspedia (BQ lpcontractsraw pipeline could replace the look up for getting Contract Price) to creating the morning financials "DO NOT TOUCH" table He is using a DONOTTOUCHtip table in production AWS as the target table, this will allow Ryan, Luke and you both

Ahsan (ahsan@shield-legal.com)
2024-07-02 13:50:12

atebha

Ryan (ryan@themedialab.agency)
2024-07-02 16:18:40

@Ahsan, invited you to all below. Let me know if yo have any trouble and send me a @shield-legal.com GitHub account so I can get you into the code.

Applications:

• Daily Financials Production Lambdas: https://us-east-1.console.aws.amazon.com/lambda/home?region=us-east-1#/applications/dailyfinancials-rebuild-py311 ◦ CalcPerf lamda: https://us-east-1.console.aws.amazon.com/lambda/home?region=us-east-1#/functions/dailyfinancials-rebuild-p-CalculatePerformancePy31-HMx37JchlIZ8?tab=code • BigQuery Shield & TIP Projects BigQuery Admin roles • In this Dev Logins sheet @Ahsan, you can use the Shield Legal lime-green https://docs.google.com/spreadsheets/d/1Ein1sRtmZA71tqkSWm78SOeyu7pyFc6tkwwjWc7e2k/edit?pli=1&gid=440674693#gid=440674693&range=45:45|row to setup PG Admin for PostGres (or tool of preference. Same for TIP below in green https://docs.google.com/spreadsheets/d/1Ein1sRtmZA71tqkSWm78SOeyu7pyFc6tkwwjWc7e2k/edit?pli=1&gid=440674693#gid=440674693&range=59:59|here. • Typeform: TypeForm https://admin.typeform.com/accounts/01F60802T5H7479M1393CWCT38/workspaces/LwiUQ7 un: <a href="mailto:ryan@shield-legal.com">ryan@shield-legal.com</a> pwd: 58+G}\-SPbDkTZ`

Ahsan (ahsan@shield-legal.com)
2024-07-02 16:48:47

*Thread Reply:* This is the Github profile I made for Shield-Legal,

AhsanSL

Ryan (ryan@themedialab.agency)
2024-07-02 18:33:26

*Thread Reply:* @Ahsan @Nicholas McFadden,

Ahsan, you have access to the Shield Legal project, the dev branch is here for the Shield Legal Daily Financials.

https://github.com/shield-legal/lambda_dailyFinancials/tree/tip_dev

👍:skin_tone_4: Ahsan
Ryan (ryan@themedialab.agency)
2024-07-03 10:37:27

@Nicholas McFadden @Ahsan

Here is the morning routine videos for reference:

  1. SLDailyFinancialsRoutineStep1_TIPLog - You'll see the TIP Fin Log clean-up. This TIP Fin Log is created by this Lambda. It might be the best place to clean up referrals and contracts at the end of the script versus Calculate Performance. Open to solutions.
  2. SLDailyFinancialsRoutineStep2_PrepTikTokLeadsSpend - Manual parsing of spend (submitted manually into #dailynumbers channel) for TikTok leads by contract by media buyer by day. Adding TypeForm Verticals by Platforms (Facebook, TikTok, TV, etc.)
  3. SLDailyFinancialsRoutineStep3_PrepTikTokRowsBuild
  4. SLDailyFinancialsRoutineStep4GetTIPSLesigncountsrev
  5. SLDailyFinancialsRoutineStep5CreateNewRowForNonSoldLeads - This has a challenge. TIP Fin Log table should have the LP contract ID to look up the price in LP, but TIP GENFIN_LOG lambda can be fixed to add the price into the TIP Fin Log table, as orginially designed and not done correctly.
👍 Nicholas McFadden
Ryan (ryan@themedialab.agency)
2024-07-03 10:59:35

@Ahsan @Nicholas McFadden, step 5 video added for unique scenario of "leads moved from one marketing-firm to another" to sign a retainer, like a "transfer" in LawRuler basically.

🙏 Nicholas McFadden