PDF Generation
The system generates proposal PDFs by integrating with Google Docs/Slides via Google Apps Script.
Generation Flow
- The service creates a temporary data token (valid for 10 minutes)
- Builds the secure URL with the proposal data
- Calls the Google Apps Script with the data
- The Apps Script populates the template in Google Drive
- Returns the document ID and URLs
Data Sent to the Template
Basic Information
- Generation and expiration dates
- Proposal code, title, and description
Customer Data
- Name, document number, legal name
- Contact (email, phone)
- Responsible person (portal user)
Products
For each item:
- Name, description, quantity
- Unit price and total
- Setup per unit and total
- Recurring per unit and total
- Whether it is a one-time product
Prices by Cycle
For each cycle (monthly, quarterly, semiannual, annual):
- Cycle total
- Discount and percentage
- First payment
- Equivalent monthly amount
Coupon
- Code, type, and discount value
Setup
- Whether there is a setup fee, total and first payment
Organization
- Organization name and document number
Generated URLs
| Type | Format |
|---|---|
| Google Docs | https://docs.google.com/document/d/{id}/edit |
| Google Slides | https://docs.google.com/presentation/d/{id}/edit |
| PDF (Docs) | https://docs.google.com/document/d/{id}/export?format=pdf |
| PDF (Slides) | https://docs.google.com/presentation/d/{id}/export/pdf |
Security
Proposal data is accessed via a temporary 10-minute token. After use or expiration, the token is invalidated.