Use Cases
What VARIO Cloud scripting can do for marketing, sales, purchasing and product data — from newsletter sync to AI-generated product texts.
This page shows what VARIO Cloud scripting can do beyond validating fields. Each use case describes the idea, how it is triggered and which services it combines. All of them are built only from services that exist today; the API details are on the linked reference pages.
The use cases combine four building blocks:
Workflow
A record is saved, created or transferred
React immediately to a business event
Batch run on a selection
A user starts a batch action on a list
Bulk updates, one-off data jobs
Scheduled script processing
A cron expression (System → Task-Manager)
Nightly jobs, polling external systems
Marketing
Sync Newsletter Contacts on Every Save
Whenever an address is saved and the customer has opted in, the script creates or updates the contact in the newsletter tool, for example Brevo, Mailchimp, CleverReach or HubSpot. When the opt-in is revoked, a second branch unsubscribes the contact.
Trigger: workflow on
account: Nach dem SpeichernServices:
accountServiceto read the address and its e-mail contact,httpClientServicewith the API key as a secret placeholder in a headerSetup: a custom field for the opt-in, the tool's API host on the whitelist, a secret with the API key
Ask for a Review After the Invoice
When an order is transferred into an invoice, the customer receives an e-mail asking for a review. Text, layout and review link live in a report group; the script only decides when to send it and passes the invoice number as a placeholder.
Trigger: workflow on
document: AFTER_TRANSFER, limited to customer invoicesServices:
outputHelperto build a mail output request with the customer as recipient,accountService.sendNotification()to send it through the output module Adress-Listen, see OutputSetup: a report group in Adress-Listen, an e-mail consumer
Segment Customers by Revenue Every Night
Every customer gets a segment A, B or C based on the net revenue of the last twelve months. Selections, newsletters and campaigns then filter by segment.
Trigger: scheduled script processing on a selection of all customers
Services:
vqlServicefor the revenue sum,accountServiceto write the segment into a custom fieldSetup: a custom field for the segment; turn on Workflows ausschalten so the update does not trigger address workflows
Pull Leads from a Web Form
Every 15 minutes the script fetches new submissions from a form service and turns them into addresses with an e-mail contact and a CRM deal created from a template. A selection that returns exactly one record serves as a plain timer.
Trigger: scheduled script processing
Services:
httpClientServicewith a bearer token secret,accountService,dtoFactory,crmDealService.createNewDtoByTemplate()Setup: the form service on the whitelist, a secret with its token, a deal template
Product Feed for Google Shopping or Price Comparison Sites
Every night the script writes the articles of a selection with number, name and price into a CSV or XML feed in the DMS, or pushes the feed to the portal's API. For standard formats, check the built-in automated data exports first.
Trigger: scheduled script processing on an article selection
Services:
ioFactorywriters into a DMS document or a string collector, optionallyhttpClientService, see Files & ExportSetup: a DMS document type for exports
Sales & CRM
Post Won Deals to Slack
Every won deal appears in the sales channel with title and volume the moment it is closed.
Trigger: workflow on
crm-deal: Nach dem Speichern, comparing the closing type with the previous stateServices:
crmDealService,httpClientServicewith a bot token secretSetup:
slack.comon the whitelist; incoming webhooks do not work because secrets are not resolved in URLs
More Sales Ideas
Assign a sales rep by postcode when an address is created
Workflow on account: Vor dem Speichern, userAndGroupService
Ask the sales manager to approve high discounts
Workflow on document: Nach dem Speichern with split gateway and user action
Create a follow-up task seven days after an offer
Workflow with a timeout element, crmTaskService.createNewDtoByTemplate()
Notify a Teams or chat channel about large orders
Workflow on document: Nach dem Speichern, httpClientService
Purchasing, Stock & Logistics
Pull purchase prices from a supplier API
Scheduled script processing on an article selection, httpClientService, priceService
Adjust purchase and sales prices to current commodity prices (copper, steel, aluminium)
Scheduled script processing on an article selection, httpClientService, priceService
Push stock levels to a marketplace or partner
Scheduled script processing on an article selection, httpClientService
Write an order export in the format of a logistics partner
Batch action on documents, XML writer into the DMS, see Files & Export
Import Supplier Images
The script downloads product images from a supplier's media server into the DMS and attaches them to the article, also from servers that need a token or user name and password. See Downloading Files into the DMS.
Product Data
Generate Product Texts with AI
A language model writes missing product descriptions for a selection of articles. The same approach translates texts, generates SEO keywords, classifies articles into product groups or summarises long supplier data sheets.
Trigger: batch action or scheduled script processing on an article selection
Services:
articleService,httpClientServicewith the AI provider's API key as a secret placeholderSetup: the provider's API host on the whitelist; turn on Workflows ausschalten so the update does not trigger article workflows
Accounting & Master Data
Send overdue dunning letters every morning
Scheduled script processing on a dunning selection, dunningService.sendViaMail()
Mail invoices with a report group per customer language
Workflow on document: AFTER_TRANSFER, documentService.sendViaMail(id, groupIdentifier)
Block saving when a rule is violated
Workflow on Vor dem Speichern with an own error message
Link incoming DMS files to records after text analysis
Workflow on shelf: Dateianalyse abgeschlossen, shelfDocumentService.createAttribution()
Good Practice
Avoid loops. A workflow that updates the record it was triggered by fires again. Use a guard that detects the change, or run bulk updates as a script processing with Workflows ausschalten.
Keep secrets in secrets. Never paste an API key into the script; request data is logged before placeholders are resolved.
Handle failures. 4xx and 5xx responses throw. Catch them where a failure must not stop the business process.
Stay within the limits. A script run is stopped after 5 minutes of JavaScript execution; a single HTTP request may take up to 300 seconds. Split large jobs into batch runs.
Log what you do.
logger.info()entries appear in the workflow protocol and the import log, which is the first place to look when something goes wrong.
Last updated
Was this helpful?