conduyt 1.33.0 → 1.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +25 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2488,6 +2488,31 @@ reports
2488
2488
  }
2489
2489
  return client.get(`/api/v1/reports/speed-to-lead?${params.toString()}`);
2490
2490
  }));
2491
+ reports
2492
+ .command("attribution")
2493
+ .description("Attribution: the window's new contacts by their first or latest touch (UTM source, medium, campaign, content, term, channel, landing page, referrer), followed to appointments, deals won and revenue")
2494
+ .option("--from <iso>", "window start (default: 366 days before --to)")
2495
+ .option("--to <iso>", "window end (default: now)")
2496
+ .option("--touch <pick>", "first (default) | last")
2497
+ .option("--group <field>", "source (default: the UTM source, else the recorded source) | utm_source | medium | campaign | content | term | channel | landing | referrer")
2498
+ .action(run(async (client, opts) => {
2499
+ const params = new URLSearchParams();
2500
+ if (opts.from)
2501
+ params.set("from", opts.from);
2502
+ if (opts.to)
2503
+ params.set("to", opts.to);
2504
+ if (opts.touch) {
2505
+ if (!["first", "last"].includes(opts.touch))
2506
+ throw new Error("--touch must be first or last");
2507
+ params.set("touch", opts.touch);
2508
+ }
2509
+ if (opts.group) {
2510
+ if (!["source", "utm_source", "medium", "campaign", "content", "term", "channel", "landing", "referrer"].includes(opts.group))
2511
+ throw new Error("--group must be source | utm_source | medium | campaign | content | term | channel | landing | referrer");
2512
+ params.set("group", opts.group);
2513
+ }
2514
+ return client.get(`/api/v1/reports/attribution?${params.toString()}`);
2515
+ }));
2491
2516
  reports
2492
2517
  .command("agents")
2493
2518
  .description("Agent performance: every rep's calls, conversations, appointments, deals won, revenue, activities and talk minutes next to their targets (prorated to the window) with attainment and a score; --compare picks up to 10 reps")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conduyt",
3
- "version": "1.33.0",
3
+ "version": "1.34.0",
4
4
  "description": "Command-line interface for Conduyt CRM — manage contacts, deals, pipelines, and run insight queries from your terminal.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",