[31588f42] fix: update Sale creation with Roboplanet-specific ID 14 and mandatory Saledate

This commit is contained in:
2026-02-28 18:15:45 +00:00
parent 4ea4b3b193
commit db95347678
3 changed files with 46 additions and 24 deletions

View File

@@ -279,16 +279,15 @@ We have successfully prototyped the creation of "Sales" (Opportunities) via the
**Prototype Script:** `connector-superoffice/create_sale_test.py`
**Key Findings:**
**Key Findings (Roboplanet Specific):**
1. **Authentication:** Must use `load_dotenv(override=True)` to ensure production credentials are used (see GEMINI.md).
2. **Required Fields for `POST /Sale`:**
* `Heading`: The title of the opportunity.
* `Amount` & `Currency`: Use `Currency: { "Id": 33 }` (for EUR) instead of string "EUR".
* `SaleType`: `{ "Id": 1 }` (General Sale / Allgemeiner Verkauf).
* `Stage`: `{ "Id": 10 }` (5% Prospect / Angebot prospektiv).
* `Source`: `{ "Id": 2 }` (Proposal Center/Lead Source).
2. **Sale Type (CRITICAL):** Use `SaleType: { "Id": 14 }` (**Roboplanet Verkauf**) to separate from Wackler parent data.
3. **Mandatory Fields:**
* `Heading`: Title of the opportunity.
* `Saledate`: Estimated closing date (ISO format).
* `Amount` & `Currency`: Use `Currency: { "Id": 33 }` (EUR).
* `Stage`: `{ "Id": 10 }` (5% Prospect).
* `Contact`: `{ "ContactId": 123 }`.
* `Person`: `{ "PersonId": 456 }` (Optional but recommended).
**Usage:**
```bash