wiki/knowledge/salesforce/quarra-prospect-number-automation.md · 967 words · 2025-09-29

Quarra Stone — Prospect Number Auto-Generation

Overview

Quarra Stone requires sequential, auto-generated prospect numbers assigned at lead creation in Salesforce. These numbers serve as the primary identifier linking leads, opportunities, and external SharePoint folders throughout the project lifecycle. This article documents the agreed implementation spec and the related folder automation work that is still being scoped.

Discussed in a working session with Twistellar (Sergei Logvin) on 2025-09-29. See also [1] and the related [2] fix addressed in the same call.


Prospect Number Field Specification

Lead Object

Attribute Value
Field name Prospect_Number__c
Label Prospect Number
Object Lead
Auto-generated Yes — sequential on lead creation
Starting value P21150 (last known used number was P21138; gap added as buffer)
Format P prefix + 5-digit integer (e.g. P21150, P21151, …)
Unique Yes
User-editable No — read-only after creation, treated like a system ID

Rationale for lead-level assignment: Numbers are assigned at lead creation rather than opportunity creation so that every prospect has an identifier from first contact, even if the lead is never converted. Some leads will consume a number without producing an opportunity — this is acceptable.

Opportunity Object

On lead conversion, the prospect number must be mapped from the lead field to the corresponding opportunity field (Prospect_Number__c on Opportunity). This ensures continuity of the identifier through the sales pipeline.

Prior to this automation, prospect numbers on existing opportunities were entered manually (likely from a spreadsheet). All existing opportunities already carry numbers; the automation only needs to handle net-new leads going forward.


Implementation Notes


Folder Creation Automation (Pending Scoping)

The prospect number is also used to name a corresponding folder in Microsoft SharePoint. Today this is a manual process: a user copies the prospect number from Salesforce and creates a folder by hand. The desired end state is full automation triggered at opportunity creation (or possibly at lead creation — to be confirmed with client).

Folder naming convention

The folder name is not the prospect number alone — it appends part of the prospect/company name. Exact convention to be confirmed with Stephen Rousseau on the Friday call.

Technical options under consideration

  1. SharePoint connector — trigger folder creation via a Salesforce-to-SharePoint connector (e.g. MuleSoft, Zapier, or a native Flow HTTP callout).
  2. Salesforce Files / Content — create the folder structure within Salesforce itself (Dimitri's suggestion), eliminating the SharePoint dependency.
  3. External middleware — a Linux VM or Node.js web app that listens for Salesforce events and calls the SharePoint API.

The Asymmetric/Twistellar team will recommend the approach; the client needs to provide SharePoint API credentials and confirm the preferred folder location and naming convention.

Open questions for Friday's call (Stephen Rousseau)


The following additional tasks were confirmed in-progress with Twistellar during the same call:


Action Items

# Action Owner Status
1 Add Prospect_Number__c to Lead: auto-generate, unique, non-editable, start at P21150, map to Opportunity on conversion Sergei Logvin (Twistellar) 🔲 Open
2 Remove Lincoln-only opportunity creation restriction — urgent Sergei Logvin (Twistellar) 🔲 Open
3 Contact Stephen Rousseau re Friday 11am ET call; inform him of opp-creation fix and prospect number automation; request attendance to discuss folder creation Karly Oykhman 🔲 Open
4 Research adding external users (e.g. architects) to Opportunity Teams via guest user option Sergei Logvin (Twistellar) 🔲 Open
5 Friday call: confirm folder creation trigger timing, naming convention, SharePoint vs. Salesforce preference, and API credentials path All 🔲 Scheduled

Key Decisions


Participants (2025-09-29 Call)

Sources

  1. Index
  2. Quarra Opportunity Creation Restriction