import { ok, badRequest, serverError } from "wix-http-functions"; import wixCrmBackend from "wix-crm-backend"; // CRM label keys — must match labels created in Wix CRM dashboard const CRM_LABELS = { base: "custom.lcg-lead", resilience: "custom.lcg-resilience", ai: "custom.lcg-ai-strategy", }; // LinkedIn URL helpers const liCompanyUrl = (slug) => slug ? `https://www.linkedin.com/company/${slug}` : ""; const liPersonUrl = (slug) => slug ? `https://www.linkedin.com/in/${slug}` : ""; // ───────────────────────────────────────────────────────────────────────────── // POST /_functions/lcgLead // // Expected JSON payload from Clay / Zapier: // { // company: string (required) // contactName: string // contactTitle: string // sector: string // size: "Small" | "Mid Cap" | "Large Cap" // hq: string // linkedinUrl: string (full contact profile URL) // liPersonSlug: string (e.g. "firstname-lastname") // liCompanySlug: string (e.g. "company-name") // email: string // phone: string // liSignals: string (comma-separated signal labels) // score: number (0–100) // focus: "resilience" | "ai" | "general" // notes: string // } // ───────────────────────────────────────────────────────────────────────────── export async function post_lcgLead(request) { let body; try { body = await request.body.json(); } catch (e) { return badRequest({ body: JSON.stringify({ error: "Invalid JSON body" }) }); } const { company, contactName, contactTitle, sector, size, hq, liPersonSlug, liCompanySlug, email, phone, liSignals, score, focus, notes } = body; if (!company) { return badRequest({ body: JSON.stringify({ error: "company is required" }) }); } // Build label list for CRM contact const labelKeys = [CRM_LABELS.base]; if (focus === "resilience") labelKeys.push(CRM_LABELS.resilience); if (focus === "ai") labelKeys.push(CRM_LABELS.ai); // Build extended fields const extendedFields = { "custom.lcg-company": company, "custom.lcg-title": contactTitle || "", "custom.lcg-sector": sector || "", "custom.lcg-size": size || "", "custom.lcg-hq": hq || "", "custom.lcg-li-person": liPersonUrl(liPersonSlug), "custom.lcg-li-company": liCompanyUrl(liCompanySlug), "custom.lcg-signals": liSignals || "", "custom.lcg-score": String(score || 0), "custom.lcg-focus": focus || "general", "custom.lcg-notes": notes || "", "custom.lcg-created": new Date().toISOString(), }; try { // Split name into first/last for CRM const nameParts = (contactName || company).trim().split(" "); const firstName = nameParts[0] || company; const lastName = nameParts.slice(1).join(" ") || ""; // Create or update contact in Wix CRM const contactInfo = { name: { first: firstName, last: lastName }, emails: email ? [{ email, tag: "MAIN" }] : [], phones: phone ? [{ phone, tag: "MAIN" }] : [], labelKeys, extendedFields, }; await wixCrmBackend.contacts.createContact(contactInfo); return ok({ body: JSON.stringify({ success: true, message: `Lead created: ${contactName || company}`, company, score: score || 0, }), }); } catch (err) { console.error("LCG CRM error:", err); return serverError({ body: JSON.stringify({ error: "CRM write failed", detail: err.message || String(err), }), }); } }
top of page
Search

Resilience Is No Longer “Nice to Have” – It Is a License to Operate

Companies are increasingly facing one clear demand: Document that you can survive the next crisis.

This requirement does not come only from the board. It comes from customers, partners, banks, and insurance companies.


They are asking specific questions:

  • Can you withstand a cyberattack?

  • What happens during climate-related events?

  • Can you continue delivering if your supply chain collapses?

  • What if key employees suddenly disappear?

  • How do you handle trade barriers, geopolitical instability, or technology dependencies?


If the answers are unclear, risk increases — and so does the cost.


The Market Has Changed

Resilience has become a competitive differentiator.

Banks and insurers demand documented contingency planning. Customers expect delivery reliability — even under pressure.International partners expect mature risk management.

This is not about fear. It is about operational reliability, compliance, and credibility.

Companies that can document their crisis preparedness win contracts. Those that cannot are deselected.


What Distinguishes Resilient Companies?

They have:

  1. A clear risk landscape — known vulnerabilities and prioritized scenarios

  2. A well-developed contingency plan — not a document in a drawer

  3. Tested processes — exercises, simulations, stress tests

  4. Trained leadership — clear roles and decision mandates

  5. A culture capable of acting under pressure


The difference between survival and collapse rarely lies in the incident itself. It lies in the ability to respond.


The Incident Will Come — The Only Question Is When

Cyberattacks. Extreme weather. Geopolitical friction. Technology failures. Supply chain disruptions.


These are no longer “black swan” scenarios. They are part of the operating environment.

Prepared companies emerge stronger.Companies without mature crisis management lose customers, capital, and momentum.


Why We See Growing Demand

At Leadership Capital Group, we are seeing a significant increase in companies seeking to:

  • Map their real risk exposure

  • Build a robust contingency structure

  • Test their crisis processes

  • Train leadership in decision-making under pressure

  • Create documentation accepted by banks, customers, and insurers


Resilience is not paranoia. It is professional leadership.


Call to Action

If your company must be able to withstand the next crisis — and document that capability —the work needs to start now.


Contact Leadership Capital Group for a concrete assessment of your resilience and crisis preparedness maturity.


The crisis does not ask whether you are ready. The market does.

 
 
 

Comments


bottom of page