vault backup: 2024-08-10 08:54:41

This commit is contained in:
2024-08-10 08:54:41 -05:00
18 changed files with 91 additions and 48 deletions

View File

@@ -1,4 +1,5 @@
{
"format": "YYYY-MM-DD (dddd)",
"autorun": true
"autorun": true,
"folder": "Work/Daily Log"
}

View File

@@ -17,6 +17,10 @@
"repelStrength": 10,
"linkStrength": 1,
"linkDistance": 250,
<<<<<<< HEAD
"scale": 0.3628873693012147,
=======
"scale": 0.36288736930121507,
>>>>>>> origin/main
"close": false
}

View File

@@ -7,30 +7,6 @@
"id": "546bd9b07f7ea6ce",
"type": "tabs",
"children": [
{
"id": "94c300538bb82cf0",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "2024-08-07 (Wednesday).md",
"mode": "source",
"source": false
}
}
},
{
"id": "04c9da25d52b39af",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "Private Equity thoughts.md",
"mode": "source",
"source": false
}
}
},
{
"id": "1ac72aa6ecff8db5",
"type": "leaf",
@@ -42,9 +18,21 @@
"source": false
}
}
},
{
"id": "b6e6101022041703",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "conflict-files-obsidian-git.md",
"mode": "source",
"source": false
}
}
}
],
"currentTab": 2
"currentTab": 1
}
],
"direction": "vertical"
@@ -110,7 +98,7 @@
"state": {
"type": "backlink",
"state": {
"file": "Chapel/Announcements/Announcements 6.md",
"file": "conflict-files-obsidian-git.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
@@ -127,7 +115,7 @@
"state": {
"type": "outgoing-link",
"state": {
"file": "Chapel/Announcements/Announcements 6.md",
"file": "conflict-files-obsidian-git.md",
"linksCollapsed": false,
"unlinkedCollapsed": false
}
@@ -150,7 +138,7 @@
"state": {
"type": "outline",
"state": {
"file": "Chapel/Announcements/Announcements 6.md"
"file": "conflict-files-obsidian-git.md"
}
}
}
@@ -171,8 +159,27 @@
"obsidian-importer:Open Importer": false
}
},
"active": "1ac72aa6ecff8db5",
"active": "b6e6101022041703",
"lastOpenFiles": [
"Chapel/Eligible speakers at the chapel.md",
"conflict-files-obsidian-git.md",
"Chapel/Announcements/Announcements 6.md",
"Work/Private Equity thoughts.md",
"Work/Logos re-platforming.md",
"Work/Enterprise subscriptions meeting.md",
"Work/Daily Log/2024-08-10 (Saturday).md",
"Work/Daily Log/2024-08-09 (Friday).md",
"Work/Daily Log/2024-08-08 (Thursday).md",
"Work/Daily Log/2024-08-06 (Tuesday).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",
"Work/BigCommerce Notes.md",
"Work/AcademicDesk integration to Salesforce.md",
"Work/2024-08-05 Duplicate billing profile bug hunting (BEN-1564).canvas",
"Work/2024-08-02 Order-level discounting email response to Dan.md",
"2024-08-10 (Saturday).md",
"Quick Notes/Songs.md",
"Quick Notes/Losing a baby.md",
@@ -181,34 +188,16 @@
"Chapel/Announcements/Chapel announcements 115.md",
"Quick Notes/Book recommendations.md",
"Chapel/Announcements/Announcements 12172023.md",
"Chapel/Announcements/Announcements 6.md",
"Chapel/Prayer meeting notes/Chapel, 9272020.md",
"Chapel/Prayer meeting notes/Chapel, 342020.md",
"Chapel/Prayer meeting notes",
"Messages/2020.02.09 Fasting.md",
"Home Maintenance/Bathroom faucets.md",
"Freelance/OAP/OAP PayPal calculations errors.md",
"Freelance/Brandhoot/Coupon service.md",
"Chapel/Chapel prayer items.md",
"Bible Study/Five Aspects of Men Study.md",
"Chapel/Feedback for Chris for his May 19th message.md",
"Bible Study/Romans",
"Bible Study/Psalms",
"Bible Study/Hebrews",
"Bible Study/Galatians",
"Bible Study/1 Thessalonians",
"Bible Study/1 Peter",
"Chapel/Response to Holly.md",
"Chapel/FBH singing 1013.md",
"Chapel/Kids singing 1013.md",
"Chapel/FBH singing, 1282019.md",
"Chapel/Announcements/Sunday announcements.md",
"Chapel/Security team first meeting planning.md",
"Chapel/Shepherding a Child's Heart book club.md",
"Chapel/Announcements/Chapel announced 1232023.md",
"Chapel/Board meeting notes",
"Chapel/Elders meeting notes",
"Chapel/Announcements",
"_Attachments/Exported image 20240808113933-0.gif",
"_Attachments/Exported image 20240808113924-0.png",
"_Attachments/Exported image 20240808113917-0 1.jpeg",

View File

@@ -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)

View File

@@ -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<opportunity> 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.

View File