diff --git a/.obsidian/daily-notes.json b/.obsidian/daily-notes.json index 1bbb9de..cb490e3 100644 --- a/.obsidian/daily-notes.json +++ b/.obsidian/daily-notes.json @@ -1,4 +1,5 @@ { "format": "YYYY-MM-DD (dddd)", - "autorun": true + "autorun": true, + "folder": "Work/Daily Log" } \ No newline at end of file diff --git a/.obsidian/graph.json b/.obsidian/graph.json index fefba01..a2ee542 100644 --- a/.obsidian/graph.json +++ b/.obsidian/graph.json @@ -17,6 +17,6 @@ "repelStrength": 10, "linkStrength": 1, "linkDistance": 250, - "scale": 0.7132754626224475, + "scale": 0.36288736930121507, "close": false } \ No newline at end of file diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index bf60bd5..cde2bad 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -8,43 +8,31 @@ "type": "tabs", "children": [ { - "id": "94c300538bb82cf0", + "id": "9d07392b60c5d996", "type": "leaf", "state": { "type": "markdown", "state": { - "file": "2024-08-07 (Wednesday).md", + "file": "Work/Daily Log/2024-08-09 (Friday).md", "mode": "source", "source": false } } }, { - "id": "04c9da25d52b39af", + "id": "97a3cb4c603d8875", "type": "leaf", "state": { "type": "markdown", "state": { - "file": "Private Equity thoughts.md", - "mode": "source", - "source": false - } - } - }, - { - "id": "1ac72aa6ecff8db5", - "type": "leaf", - "state": { - "type": "markdown", - "state": { - "file": "2024-08-08 (Thursday).md", + "file": "Work/Daily Log/2024-08-10 (Saturday).md", "mode": "source", "source": false } } } ], - "currentTab": 2 + "currentTab": 1 } ], "direction": "vertical" @@ -110,7 +98,7 @@ "state": { "type": "backlink", "state": { - "file": "2024-08-08 (Thursday).md", + "file": "Work/Daily Log/2024-08-10 (Saturday).md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -127,7 +115,7 @@ "state": { "type": "outgoing-link", "state": { - "file": "2024-08-08 (Thursday).md", + "file": "Work/Daily Log/2024-08-10 (Saturday).md", "linksCollapsed": false, "unlinkedCollapsed": false } @@ -150,11 +138,12 @@ "state": { "type": "outline", "state": { - "file": "2024-08-08 (Thursday).md" + "file": "Work/Daily Log/2024-08-10 (Saturday).md" } } } - ] + ], + "currentTab": 3 } ], "direction": "horizontal", @@ -171,8 +160,28 @@ "obsidian-importer:Open Importer": false } }, - "active": "1ac72aa6ecff8db5", + "active": "97a3cb4c603d8875", "lastOpenFiles": [ + "Work/BigCommerce Notes.md", + "Work/Daily Log/2024-08-10 (Saturday).md", + "Work/Daily Log/2024-08-09 (Friday).md", + "Work/2024-08-02 Order-level discounting email response to Dan.md", + "Work/2024-08-05 Duplicate billing profile bug hunting (BEN-1564).canvas", + "Messages/2018.02.04 Galatians 57-12.md", + "Messages/2017.10.01 Luke 1213-21.md", + "Prayer Meetings/Nathan and Ashley Hanson home, 8272019.md", + "Prayer Meetings/Chapel, 9272020.md", + "Prayer Meetings/Chapel, 9112019.md", + "Prayer Meetings/Chapel, 1242019.md", + "Prayer Meetings/Chapel, 342020.md", + "Quick Notes/2002 Coachman Clipper 106 Sport Pop-Up Camper, Dometic Refrigerator, Suburban Furnace, Vitco 2-Burner Range, No Propane Tank, VIN 1TC1C510X35002745 - Mayo Auction & Realty.md", + "Work/Daily Log/2024-08-06 (Tuesday).md", + "Work/Daily Log/2024-08-08 (Thursday).md", + "Work/Daily Log/2024-08-07 (Wednesday).md", + "Work/Daily Log/2024-08-05 (Monday).md", + "Work/Daily Log/2024-08-02 (Friday).md", + "Work/Daily Log/2024-08-01 (Thursday).md", + "Work/Daily Log", "Reading/Read Later/Paper Moving off the Map.md", "Reading/Read Later/httpsworld.hey.comdhhcloud-exit-pays-off-in-performance-too-4c53b697.md", "Reading/Read Later/httpsblackgirlbytes.deva-beginners-guide-to-prompt-engineering-with-github-copilot.md", @@ -181,24 +190,6 @@ "[3.md", "Quick Notes/Questions for PATHAR.md", "Quick Notes/Sam’s club.md", - "Quick Notes/Sam’s Club 1.md", - "Quick Notes/Sam’s club 2.md", - "Quick Notes/Sam’s club 3.md", - "Chapel/116 announcements.md", - "Quick Notes/Announcements.md", - "Reading Movies/How to read a movie.md", - "Recipes/Pancakes.md", - "Recipes/Marinated Smoked Goose Breast Recipe.md", - "Recipes/Are You Game Smoked Goose Breasts Ducks Unlimited.md", - "Topical studies/Leaving a church/When is it right to leave a church.md", - "Topical studies/Leaving a church/Scriptural Reasons for Leaving a Church.md", - "Topical studies/Leaving a church/How To Leave a Church BiblicalEldership.com.md", - "Work/Switching jobs pros and cons.md", - "Chapel/Announcements 1.md", - "Camps/Good News Camp 2019/Preparation.md", - "Camps/Good News Camp 2018/Testimony.md", - "Camps/Good News Camp 2018/Meal-time devotions.md", - "Camps/Good News Camp 2018/Counselor Meeting Notes.md", "_Attachments/Exported image 20240808113933-0.gif", "_Attachments/Exported image 20240808113924-0.png", "_Attachments/Exported image 20240808113917-0 1.jpeg", @@ -214,12 +205,10 @@ "httpsblackgirlbytes.deva-beginners-guide-to-prompt-engineering-with-github-copilot.md/Attachment.pdf", "httpsworld.hey.comdhhcloud-exit-pays-off-in-performance-too-4c53b697.md/Attachment.pdf", "_Attachments", - "2024-08-05 Duplicate billing profile bug hunting (BEN-1564).canvas", "Logos meeting notes", "Reading Movies", "Quick Notes", "Prayer Meetings", - "Messages", "Untitled.canvas" ] } \ No newline at end of file diff --git a/2024-08-02 Order-level discounting email response to Dan.md b/Work/2024-08-02 Order-level discounting email response to Dan.md similarity index 100% rename from 2024-08-02 Order-level discounting email response to Dan.md rename to Work/2024-08-02 Order-level discounting email response to Dan.md diff --git a/2024-08-05 Duplicate billing profile bug hunting (BEN-1564).canvas b/Work/2024-08-05 Duplicate billing profile bug hunting (BEN-1564).canvas similarity index 100% rename from 2024-08-05 Duplicate billing profile bug hunting (BEN-1564).canvas rename to Work/2024-08-05 Duplicate billing profile bug hunting (BEN-1564).canvas diff --git a/AcademicDesk integration to Salesforce.md b/Work/AcademicDesk integration to Salesforce.md similarity index 100% rename from AcademicDesk integration to Salesforce.md rename to Work/AcademicDesk integration to Salesforce.md diff --git a/Work/BigCommerce Notes.md b/Work/BigCommerce Notes.md new file mode 100644 index 0000000..fa589a0 --- /dev/null +++ b/Work/BigCommerce Notes.md @@ -0,0 +1,7 @@ +#bigcommerce #logos + +# Tax Provider API +You can create tax provider apps that can integrate with a custom tax provider system. There are some reason (which I don't remember) that are preventing us from using the built-in Avalara tax app. We use Avalara, but in some custom way that the app doesn't support. + +It looks like we already implemented this: [[PAY-2742] Update SalesTaxApi BigCommerce Tax Provider for new Pick List Strategy - Jira (atlassian.net)](https://faithlife.atlassian.net/browse/PAY-2742) + diff --git a/2024-08-01 (Thursday).md b/Work/Daily Log/2024-08-01 (Thursday).md similarity index 100% rename from 2024-08-01 (Thursday).md rename to Work/Daily Log/2024-08-01 (Thursday).md diff --git a/2024-08-02 (Friday).md b/Work/Daily Log/2024-08-02 (Friday).md similarity index 100% rename from 2024-08-02 (Friday).md rename to Work/Daily Log/2024-08-02 (Friday).md diff --git a/2024-08-05 (Monday).md b/Work/Daily Log/2024-08-05 (Monday).md similarity index 100% rename from 2024-08-05 (Monday).md rename to Work/Daily Log/2024-08-05 (Monday).md diff --git a/2024-08-06 (Tuesday).md b/Work/Daily Log/2024-08-06 (Tuesday).md similarity index 100% rename from 2024-08-06 (Tuesday).md rename to Work/Daily Log/2024-08-06 (Tuesday).md diff --git a/2024-08-07 (Wednesday).md b/Work/Daily Log/2024-08-07 (Wednesday).md similarity index 100% rename from 2024-08-07 (Wednesday).md rename to Work/Daily Log/2024-08-07 (Wednesday).md diff --git a/2024-08-08 (Thursday).md b/Work/Daily Log/2024-08-08 (Thursday).md similarity index 100% rename from 2024-08-08 (Thursday).md rename to Work/Daily Log/2024-08-08 (Thursday).md diff --git a/Work/Daily Log/2024-08-09 (Friday).md b/Work/Daily Log/2024-08-09 (Friday).md new file mode 100644 index 0000000..e2f4a79 --- /dev/null +++ b/Work/Daily Log/2024-08-09 (Friday).md @@ -0,0 +1,42 @@ +#logos + +# Quotes code refactoring in CRM API +#quotes #crmapi +Refactored the AdminQuotesController in CrmApi today. It queries quotes from Logos (OrdersApi) and from Salesforce. I like the pattern of having two interfaces: ILogosQuotesService and ICrmQuotesService to abstract both sources but admit that most of our code is aware that we're getting quotes from two places and so it makes sense for it to reference interfaces tied to one side and the other instead of a single interface the somehow abstracts both sides of the fence. + +After refactoring, the orders API client in my implementation of ILogosQuoteService is returning unauthorized. The problem was that I set it up in the CrmApi.v1 TypeRegistry as a Singleton instead of HybridHttpOrThreadLocalScoped. That won't work because it has to pass credentials per request. + +# Deleted Opportunity problems in CRM API +#quote #crmapi #salesforce #apex +The CRM API integration tests were failing because the test quote couldn't be integrated to Salesforce UAT sandbox because a record with the same external id (our Logos quote ID) already existed, but was soft-deleted. + +I was having trouble finding the soft-deleted record. [This article]([How to find deleted records in Salesforce using SOQL | Wipfli](https://www.wipfli.com/insights/articles/tc-how-to-find-deleted-records-in-salesforce-using-soql)) helped. The answer is to execute developer console Apex code: +```apex +List deletedOpps = [SELECT Id +FROM Opportunity +WHERE LogosQuoteId__c = '6667952' and IsDeleted = TRUE +ALL ROWS]; + +system.debug(deletedOpps); +``` + +The `ALL ROWS` part is the key. But, it doesn't work with a regular SOQL query, just from Apex code like this. + +I had to insert a new record manually because the upsert we were doing in the quote loader was always failing with an `ENTITY_DELETED` error. I used Apex (the developer console in Salesforce) to +execute this: +```apex +Opportunity opp = new Opportunity(Amount = 10, Name='bens test', CloseDate = Date.newInstance(1960, 2, 17), StageName='Negotiating', LogosQuoteId__c = '6667952'); +insert opp; +``` + +Now the integration test passes. + +The key findings I had to research to get right: +1. The list of parameters to the sobject (`Opportunity`) are comma-separated and formatted as `key = value` +2. Create a new Date with `Date.newInstance(year, month, date)` +3. Use `insert nn` to insert the object + +# Segment/Cohort Count Scheduled Check +I implemented a scheduled check in CRM API to compare segment population counts from our DB to the user counts in Amplitude cohorts. The idea was to highlight cohorts where the population difference was difference enough to indicate sync was failing somehow. + +Unfortunately, this approach didn't work. Some cohorts were even over 50% off from the segment population count. I'm assuming this is because the users are just not present in Amplitude, which is very possible. I removed the scheduled check for now until (if) we can find a better solution to check on these syncs. \ No newline at end of file diff --git a/Work/Daily Log/2024-08-10 (Saturday).md b/Work/Daily Log/2024-08-10 (Saturday).md new file mode 100644 index 0000000..e69de29 diff --git a/Enterprise subscriptions meeting.md b/Work/Enterprise subscriptions meeting.md similarity index 100% rename from Enterprise subscriptions meeting.md rename to Work/Enterprise subscriptions meeting.md diff --git a/Logos re-platforming.md b/Work/Logos re-platforming.md similarity index 100% rename from Logos re-platforming.md rename to Work/Logos re-platforming.md diff --git a/Private Equity thoughts.md b/Work/Private Equity thoughts.md similarity index 100% rename from Private Equity thoughts.md rename to Work/Private Equity thoughts.md