# Manufacturing RFQ Intake & BOM Preflight (`winning_moonstone/manufacturing-rfq-intake-preflight`) Actor

Turn manufacturing RFQ text and public PDF/CSV attachments into structured quote briefs, flag missing quoting inputs, and preflight BOM issues before estimator review.

- **URL**: https://apify.com/winning_moonstone/manufacturing-rfq-intake-preflight.md
- **Developed by:** [月 明](https://apify.com/winning_moonstone) (community)
- **Stats:** 2 total users, 1 monthly users, 85.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$150.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Manufacturing RFQ Intake & BOM Preflight

A focused Apify Actor for manufacturers, job shops, contract manufacturers, PCB/PCBA teams, injection molders, sheet-metal shops, and automation workflows that receive RFQs by email.

It converts customer RFQ text plus optional public PDF/text attachments into a structured quotation-intake brief and flags missing or conflicting information before an estimator or engineer spends time reviewing it. An optional BOM CSV preflight catches blank/invalid quantities and duplicate part numbers.

### Why this exists

Manufacturing RFQs often arrive as a mix of email text, PDFs, drawings, BOMs, and notes. Sales and estimating teams repeatedly search for the same fields: quantity, material, process, tolerance, finish, lead time, and part/drawing number. Missing details create back-and-forth before quoting.

This Actor is intentionally a **preflight assistant**, not an engineering authority. It does not approve drawings, select materials, validate GD\&T, calculate machinability, or issue a final quotation.

### Input

- `rfqText`: customer email or RFQ notes.
- `documentUrls`: optional public HTTP(S) PDF/text URLs, up to 10.
- `bomCsvUrl`: optional public CSV/TSV BOM.
- `requiredFields`: defaults to quantity, material, process.
- `recommendedFields`: defaults to tolerance, finish, leadTime.
- `maxPagesPerPdf`: defaults to 20, maximum 50.
- `includeRawText`: false by default to minimize retained customer content.

Example:

```json
{
  "rfqText": "Please quote 250 pcs, aluminum 6061-T6, CNC milling, tolerance ±0.05 mm, black anodized, lead time 3 weeks.",
  "requiredFields": ["quantity", "material", "process"]
}
```

### Output

One dataset record per completed preflight, including:

- readiness status and score;
- extracted candidate values;
- missing required fields;
- warnings for multiple candidate values;
- BOM anomaly summary;
- source-processing errors;
- explicit limitations for human review.

Example result:

```json
{
  "status": "ready",
  "readinessScore": 100,
  "missingRequiredFields": [],
  "fields": {
    "quantity": {"primary": "250", "candidates": ["250"]},
    "material": {"primary": "aluminum 6061-T6", "candidates": ["aluminum 6061-T6"]},
    "process": {"primary": "CNC machining", "candidates": ["CNC machining"]}
  }
}
```

### BOM checks

For CSV/TSV BOMs the Actor checks whether recognizable part-number and quantity columns exist, and flags blank part numbers, invalid/non-positive quantities, and duplicate part numbers.

### Safety and limits

Only public HTTP(S) document URLs are accepted. URL credentials, non-standard ports, and non-public resolved addresses are rejected, including after redirects. Each document is capped at 8 MB and combined downloads at 20 MB. PDF extraction is text-based; image-only/scanned PDFs may need OCR in a separate workflow.

Final quotation, drawing interpretation, tolerance acceptance, material/process selection, and engineering approval must remain human decisions.

### Automation use

The output is suitable for n8n, Make, Zapier, CRM/ERP intake, Google Sheets, or a custom quoting pipeline. A common flow is:

customer email / form → attachment storage → this Actor → estimator review → CRM/ERP record → quote workflow.

### Pricing

Release target: **$0.15 per completed RFQ preflight** using Apify pay-per-event billing. One preflight can include RFQ text, bounded document extraction, and one BOM check. The event is charged only when a result is written.

### Development

```bash
pip install -r requirements.txt
python -m unittest discover -s tests -v
python -m src
```

# Actor input Schema

## `rfqText` (type: `string`):

Paste the customer RFQ email or notes.

## `documentUrls` (type: `array`):

Optional public HTTP(S) PDFs or text documents. Up to 10.

## `bomCsvUrl` (type: `string`):

Optional public HTTP(S) CSV/TSV BOM to preflight.

## `requiredFields` (type: `array`):

Configuration for Required quoting fields.

## `recommendedFields` (type: `array`):

Configuration for Recommended quoting fields.

## `maxDocuments` (type: `integer`):

Configuration for Maximum documents.

## `maxPagesPerPdf` (type: `integer`):

Configuration for Maximum pages per PDF.

## `timeoutSeconds` (type: `integer`):

Configuration for Download timeout.

## `includeRawText` (type: `boolean`):

Off by default to minimize retained customer content.

## Actor input object example

```json
{
  "rfqText": "Please quote 250 pcs aluminum 6061-T6 CNC milling, tolerance ±0.05 mm, black anodized, lead time 3 weeks.",
  "requiredFields": [
    "quantity",
    "material",
    "process"
  ],
  "recommendedFields": [
    "tolerance",
    "finish",
    "leadTime"
  ],
  "maxDocuments": 5,
  "maxPagesPerPdf": 20,
  "timeoutSeconds": 25,
  "includeRawText": false
}
```

# Actor output Schema

## `summary` (type: `string`):

No description

## `dataset` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "rfqText": "Please quote 250 pcs aluminum 6061-T6 CNC milling, tolerance ±0.05 mm, black anodized, lead time 3 weeks."
};

// Run the Actor and wait for it to finish
const run = await client.actor("winning_moonstone/manufacturing-rfq-intake-preflight").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "rfqText": "Please quote 250 pcs aluminum 6061-T6 CNC milling, tolerance ±0.05 mm, black anodized, lead time 3 weeks." }

# Run the Actor and wait for it to finish
run = client.actor("winning_moonstone/manufacturing-rfq-intake-preflight").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "rfqText": "Please quote 250 pcs aluminum 6061-T6 CNC milling, tolerance ±0.05 mm, black anodized, lead time 3 weeks."
}' |
apify call winning_moonstone/manufacturing-rfq-intake-preflight --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,winning_moonstone/manufacturing-rfq-intake-preflight"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/P7ikfzfA1OFU1pT2i/builds/fDIbne2bVlMwZxiym/openapi.json
