Skip to content

Instantly share code, notes, and snippets.

@ssachs-chwy
ssachs-chwy / CPH - Vulcan integration contract sketches.txt
Created April 28, 2025 17:01
CPH - Vulcan integration contract sketches
option A - API for baseline data, kafka for skus
POST /promos
{
"name": "Hills 25% off",
"promo_group_id": 40,
"start_date": "2025-05-01",
"end_date": "2025-05-08",
"public_code": "CHEWY2025",
"promo_code_required": true,
@ssachs-chwy
ssachs-chwy / linecount.sh
Created April 14, 2025 14:17
Python files line count
# list all the python files within a repo sorted by line count of each file
git ls-files '*.py' | while read -r file; do
if [[ -f "$file" ]]; then
lines=$(wc -l < "$file")
printf "%7d %s\n" "$lines" "$file"
fi
done | sort -n
openapi: 3.0.1
info:
version: 1.0.0
title: VPP Chatbot
description: An API to provide Chewy staff with insight into vendor promotions and contact information.
contact:
name: Vendor Partner Portal Team
email: DL-VPP_Technology@chewy.com
servers:
- url: https://vpp-api-dev.chewy.net/api/v1
@ssachs-chwy
ssachs-chwy / gist:afcbd9157b578f3465431b5b1809514b
Last active July 10, 2024 19:55
find part number giveaways for promo
select reward, substring(reward from '^[^\"]*\"([^\"]*)\"')
from promotion p where
p.status = 1 and
(
reward like '%delegate.addFreeNonPurchasableGift(%'
or reward like '%delegate.addFreePurchasableGift(%'
or reward like '%delegate.addFreePurchasableGiftWithMinOrderQuantity(%'
or
(reward like '%delegate.addFreePurchasableGiftWithEachOrderQuantity(%'
and reward not like '%delegate.addFreePurchasableGiftWithEachOrderQuantity(%null%')
@ssachs-chwy
ssachs-chwy / greenbar contract with autoship discounts.txt
Last active August 4, 2023 19:01
greenbar contract with autoship discounts
POST {{ base_url }}/v1/promos/promotions/search-promotionEligibility?add_discounts=true
{
"part_numbers": ["46861"],
"member_id": 255182201
}
POST {{ _.base_url }}/v1/promos/PromotionsByCatalogEntryIds?add_discounts=true
{
"member_id": 100257333,
@ssachs-chwy
ssachs-chwy / promo pricing loe.txt
Last active August 4, 2023 18:49
Promo Pricing LOE
page to update: https://chewyinc.atlassian.net/wiki/spaces/Pro/pages/2169771881/Promotional+Pricing+-+Project+Tracker#Tech-Design-and-LOEs
# REQUEST
POST /promos/widget-searches
{
"part_numbers": ["46861", "789"],
"member_id": 255182201
}
@ssachs-chwy
ssachs-chwy / ALE plan - incremental CATS delivery.txt
Last active August 2, 2023 15:58
ALE plan - incremental CATS delivery
Cart Viewed schema (from spreadsheet)
https://chewycomllc-my.sharepoint.com/personal/nwhitacre_chewy_com/Documents/CATS%20(Chewy%20Analytics%20Technology%20Schema).xlsx?d=w9487770d5e264f9b8c09e218a1ba133f&csf=1&web=1&e=tdxdTR
cell J14:
239,258,259,260,261,262,263,264,265,266,267,268,269,270,274,276,277,278,279,280,281,282,284,286,288,290,293,294,304
user context
application
schema context ("CATS 2.0")
user traits (stuff we sent to identify)
@ssachs-chwy
ssachs-chwy / apply promos in pdp and plp options.txt
Last active August 3, 2023 17:30
apply promos in pdp and plp options
Options for "Apply Promos in PDP/PLP" project
Scope is pre-peak phases (1 & 2) only
*** OPTION A ***
time 0. page load
display autoship widget
time 1.
pdp -> autoship widget -> (some kind of a level service) ->
@ssachs-chwy
ssachs-chwy / apply request with promo abuse
Last active March 21, 2023 16:35
promo abuse apply request
{
"cart_id": 1,
"id": 1234,
"is_auto_ship": false,
"order_items": [
{
"id": 1,
"part_number": "328454",
"personalization_attributes": {},
"quantity": 1,
@ssachs-chwy
ssachs-chwy / available codes.txt
Last active March 21, 2023 14:11
cwav scenario
KE9QXGFE6
HWNLUW7U3
VVEWSKKPZ
FBBATSFR9
CVKW4EZZX
TBMEHYW72
PC3FWXYFQ
R93K8A9A4
S6A6F7PCM
WMUS63EPJ