Help Centre › Functions & Formulas
This article describes the RPA Sage connector function to create a sales invoice.
For a full list of available functions, please read SAGE functions.
Description
The Create sales invoice function creates a new sales invoice in Sage. Provide the contact ID, invoice date, and an array of line items with descriptions, quantities, unit prices, and ledger account IDs.
Setting it up
{{popups:rpas/add:action=sage-create-sales-invoice}}
Once on a process map:
- Navigate to the process where you would like to add the function
- Click on the green button’s drop-down (right side of the green button labelled “Process”)
- On the menu that appears, click on the “+ Activity” item
- From here you can select the SAGE Create sales invoice option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Connector | Yes | Select | - | Select the Sage connector to use |
| Contact ID | Yes | Text | - | Contact ID (use List contacts to find) |
| Date | Yes | Text | - | Invoice date (YYYY-MM-DD) |
| Invoice Lines | Yes | Textarea | - | JSON array of line items, e.g. [{"description":"Service","quantity":1,"unit_price":500}] |
| Variable | Yes | Text | - | Variable to store the created invoice |
Output variables
| Variable | Type | Description |
|---|---|---|
| Variable | Object | The created invoice with id, invoice_number, total, status |
Errors
- Contact not found – the contact ID is invalid
- Validation error – required fields are missing or invalid
Tips
- Use List contacts to find the contact ID first
- Date format must be YYYY-MM-DD
- Use variables in the line items JSON for dynamic values
Related functions
- List sales invoices – List existing invoices
- List contacts – Find contact IDs
- List ledger entries – View ledger