The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
comment out lead reward rule
Steven Tey00b65a80674d
diff --git a/apps/web/app/api/stripe/integration/webhook/customer-created.ts b/apps/web/app/api/stripe/integration/webhook/customer-created.tsindex d3f49a9d42..cb11f03af7 100644--- a/apps/web/app/api/stripe/integration/webhook/customer-created.ts+++ b/apps/web/app/api/stripe/integration/webhook/customer-created.ts@@ -125,18 +125,19 @@ export async function customerCreated(event: Stripe.Event) {]);if (link.programId && link.partnerId) {- await prisma.commission.create({- data: {- programId: link.programId,- linkId: link.id,- partnerId: link.partnerId,- eventId: leadData.event_id,- customerId: customer.id,- type: "lead",- amount: 0,- quantity: 1,- },- });+ // TODO: check if there is a Lead Reward Rule for this partner and if yes, create a lead commission+ // await prisma.commission.create({+ // data: {+ // programId: link.programId,+ // linkId: link.id,+ // partnerId: link.partnerId,+ // eventId: leadData.event_id,+ // customerId: customer.id,+ // type: "lead",+ // amount: 0,+ // quantity: 1,+ // },+ // });}waitUntil(diff --git a/apps/web/app/api/track/lead/route.ts b/apps/web/app/api/track/lead/route.tsindex 1cecb5b4b1..92d6da3163 100644--- a/apps/web/app/api/track/lead/route.ts+++ b/apps/web/app/api/track/lead/route.ts@@ -124,18 +124,19 @@ export const POST = withWorkspaceEdge(]);if (link.programId && link.partnerId) {- await prismaEdge.commission.create({- data: {- programId: link.programId,- linkId: link.id,- partnerId: link.partnerId,- eventId,- customerId: customer.id,- type: "lead",- amount: 0,- quantity: 1,- },- });+ // TODO: check if there is a Lead Reward Rule for this partner and if yes, create a lead commission+ // await prismaEdge.commission.create({+ // data: {+ // programId: link.programId,+ // linkId: link.id,+ // partnerId: link.partnerId,+ // eventId,+ // customerId: customer.id,+ // type: "lead",+ // amount: 0,+ // quantity: 1,+ // },+ // });}await sendWorkspaceWebhookOnEdge({diff --git a/apps/web/lib/integrations/shopify/create-lead.ts b/apps/web/lib/integrations/shopify/create-lead.tsindex d23906f629..aecc3820da 100644--- a/apps/web/lib/integrations/shopify/create-lead.ts+++ b/apps/web/lib/integrations/shopify/create-lead.ts@@ -85,18 +85,19 @@ export async function createShopifyLead({]);if (link.programId && link.partnerId) {- await prisma.commission.create({- data: {- programId: link.programId,- linkId: link.id,- partnerId: link.partnerId,- eventId: leadData.event_id,- customerId: customer.id,- type: "lead",- amount: 0,- quantity: 1,- },- });+ // TODO: check if there is a Lead Reward Rule for this partner and if yes, create a lead commission+ // await prisma.commission.create({+ // data: {+ // programId: link.programId,+ // linkId: link.id,+ // partnerId: link.partnerId,+ // eventId: leadData.event_id,+ // customerId: customer.id,+ // type: "lead",+ // amount: 0,+ // quantity: 1,+ // },+ // });}waitUntil(