English
English
English
English
One endpoint for keeping a value your integration works with up to date from your own system — a list in a Google Sheet, a price table, a set of codes that changes every few weeks.
PUT /source-processors/{id}/constants/{name} replaces the value of one constant on one source-to-processor link.A processor's spec declares its constants; the value lives on each link between a source and that processor. This endpoint sets that value and nothing else. It can change what a processor is given, never what the processor does.
Open the provider in the admin, go to its Sources, and edit the source. Under each constant of a linked processor the modal shows the full URL to call, with the right id already filled in. The id is the link's, not the source's or the processor's: a processor fed by two sources has two links, and each holds its own values.
PUT /integrations/api/v1/source-processors/12/constants/products_of_the_month
Content-Type: application/json{
"value": [
{ "start": "2026-10-01", "end": "2026-11-29", "products": ["ART123", "ART456"] },
{ "start": "2026-11-15", "end": "2027-01-14", "products": ["ART789"] }
]
}{
"name": "products_of_the_month",
"value": [ … ]
}value can be text, a number, a list or an object, and every text in it — nested ones too — is tidied the way SalesDash tidies all input: spaces around it are trimmed, an empty text is stored as empty (null), and "true"/"false" become true/false. A pasted code with a stray space still matches, and a blank date cell stops the record visibly instead of being read as some date. Every call replaces the whole value — there is no merging — so always send the complete list, not just the row that changed. That also makes the call safe to repeat: send the same list twice and nothing changes.
The next record the processor handles reads the new value. Records it already handled are not processed again because the value changed; they pick it up only when the source delivers them again.
| Response | When |
|---|---|
| 200 | The value was stored. |
| 404 | No link with this id. |
422 on name | The processor's spec declares no constant with this name — check the spelling against the spec. |
422 on value | value is missing; or the constant is required and you sent an empty value (null, "" or []); or the value is larger than 64 KB as JSON. |
A required constant can't be emptied
If a required constant has no value, the processor stops on every record it receives. That is why an empty value is refused rather than stored: a script that reads an empty sheet by mistake gets a 422, and the processor keeps running on the last list it was sent.
Whichever saves last wins
An admin can also edit the value in the source's edit modal. SalesDash keeps no history of either: the last save, from the modal or from your script, is the value. Saving the modal writes back every constant as it was when the modal opened — so a modal left open while your script pushes, then saved to change something else, puts the old list back. Close it and open it again first.
A Google Sheets Apps Script can push the sheet whenever it is edited. Two things trip people up:
onEdit. A simple trigger is not allowed to call other services, so its request never leaves the sheet.Date in the script's timezone; toISOString() converts it to UTC and can move it to the day before. Use Utilities.formatDate(date, 'Europe/Amsterdam', 'yyyy-MM-dd').Store the API key in the script's Script properties, not in the code, and log response.getResponseCode() so a failed push shows up in the script's executions.