Purpose
Resolve a bid identified in an invitation or procurement listing to the corresponding Cal eProcure event, collect the event details and downloadable bid attachments, and pass the structured result to /rei-bid-intake.
When to Use
Use when the caller has a bid name, agency, solicitation number, or invitation reference but needs the authoritative Cal eProcure event and its bid package. This also applies to DMV solicitations. Use an already authorized session for any external procurement-listing source; never embed credentials in the workflow.
Workflow
- If the invitation provides only a solicitation number, resolve it through the authorized procurement-listing session with a direct search URL such as:
https://www.napc.pro/nsi_reports.php?owner_designer=&formareacode=Area+Code&formage=&formbidto=Bid+Date+Before&formsolicnum={solicitation-number}&formtags=all&formstatus=report&formscope=Keyword+Scope+Search&formstateprovid%5B%5D=&countyid%5B%5D=&formcity=City&worktype%5B%5D=&formsetaside%5B%5D=&x=42&y=10Select the matching agency/title/date result and read its linked project or Cal eProcure event reference; do not guess opaque IDs. - Once the event and bid identifiers are known, navigate directly to:
https://caleprocure.ca.gov/event/{event-id}/{bid-number}Wait for the event page's dynamic content to load, then run the evaluator below in one page call. - If bid-package attachments are needed, activate the event's download control
#RESP_INQ_DL0_WK_AUC_DOWNLOAD_PB; after the attachment panel appears, activate the relevant download button, typicallybutton[name='PV_ATTACH_WRK_SCM_DOWNLOAD$2']. Preserve the resulting downloaded files or URLs for intake. - Pass the evaluator result, solicitation/event identifiers, and downloaded attachment references to
/rei-bid-intake.
Evaluator to run on the loaded Cal eProcure event page:
(() => {
const clean = v => (v || '').replace(/\\s+/g, ' ').trim();
const text = clean(document.body.innerText);
const fields = {};
for (const row of document.querySelectorAll('tr')) {
const cells = [...row.querySelectorAll('th,td')].map(e => clean(e.innerText));
if (cells.length >= 2 && cells[0] && cells[1] && cells[0].length < 120) fields[cells[0].replace(/:$/, '')] = cells.slice(1).join(' | ');
}
const attachments = [...document.querySelectorAll('a,button,input[type="button"],input[type="submit"]')]
.map(e => ({
text: clean(e.innerText || e.value || e.getAttribute('aria-label')),
href: e.getAttribute('href'),
id: e.id || null,
name: e.getAttribute('name'),
onclick: e.getAttribute('onclick')
}))
.filter(x => /attach|download|document|package|vendor ads|solicitation/i.test([x.text, x.href, x.id, x.name, x.onclick].filter(Boolean).join(' ')));
const m = location.pathname.match(/\\/event\\/([^/]+)\\/([^/?#]+)/i);
return {
source: 'caleprocure.ca.gov',
url: location.href,
eventId: m ? decodeURIComponent(m[1]) : null,
bidNumber: m ? decodeURIComponent(m[2]) : null,
fields,
attachments,
pageText: text
};
})()Site-Specific Gotchas
- Cal eProcure event URLs use two path identifiers:
/event/{event-id}/{bid-number}. Both must come from the resolved listing or invitation; opaque IDs must not be fabricated. - The page is dynamic. Wait for event content before inspecting controls.
- The bid-package download is a two-stage interaction: first
#RESP_INQ_DL0_WK_AUC_DOWNLOAD_PB, then the attachment download control, commonlyPV_ATTACH_WRK_SCM_DOWNLOAD$2. - Attachment downloads may not appear as ordinary anchors or may open a generated response; retain the event URL and attachment metadata even when no direct file URL is exposed.
- Procurement-listing login is a prerequisite only when the caller lacks an authorized session. Obtain authentication interactively or from the runtime's credential store; do not record usernames, passwords, or tokens in the skill.
Expected Output
A /rei-bid-intake handoff containing the Cal eProcure event URL, eventId, bidNumber, normalized event fields, attachment metadata or downloaded files, and the originating solicitation/invitation reference.