[31588f42] feat: implement SuperOffice Sales API prototype and fix auth docs
This commit is contained in:
@@ -273,6 +273,29 @@ python3 connector-superoffice/create_email_test.py 193036
|
||||
* `POST /Document`: Creates the email body and metadata.
|
||||
* `POST /Appointment`: Creates the activity record linked to the document.
|
||||
|
||||
### 17. Sales & Opportunities Implementation (Feb 28, 2026)
|
||||
|
||||
We have successfully prototyped the creation of "Sales" (Opportunities) via the API. This allows the AI to not only enrich contacts but also create tangible pipeline objects for sales representatives.
|
||||
|
||||
**Prototype Script:** `connector-superoffice/create_sale_test.py`
|
||||
|
||||
**Key Findings:**
|
||||
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).
|
||||
* `Contact`: `{ "ContactId": 123 }`.
|
||||
* `Person`: `{ "PersonId": 456 }` (Optional but recommended).
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
python3 connector-superoffice/create_sale_test.py
|
||||
```
|
||||
This script finds the first available contact in the CRM and creates a test opportunity for them.
|
||||
|
||||
---
|
||||
This is the core logic used to generate the company-specific opener.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user