edoc automate Guide
v26.8.4 v26.7.9 German English
Auto Light Dark
Auto Light Dark
v26.8.4 v26.7.9 German English

document - edoc automate action

The following actions are available for interacting with edoc documents service:

Things to know
The functions in connection with schemas were not created as actions due to their complexity. Instead, you can create an instance of the DocumentService class in the PHP code (e.g. in a plug-in action) and use the following functions:

  • getSchemas(): array

  • getSchema(string $schemaName): array

  • saveSchema(string $schemaName, array $data): void

  • deleteSchema(string $schemaName): void

  • getSchemaWebhooks(string $schemaName, string $appName): array

  • saveSchemaWebhooks(string $schemaName, string $appName, array $data): void

  • deleteSchemaWebhooks(string $schemaName, string $appName): void

Example:

PHP
$dsClient = \edoc\appserver\services\DocumentService::GetInstance();
$dsClient->saveSchema(
    'order-confirmation.active',
    [
        "label": [
            "de": "Auftragsbestätigung | Aktiv",
            "en": "Order confirmation | Active"
        ],
        "attributes" => [
            "order_description": [
                "type": "nullable|string",
                "label": [
                    "de": "Beschreibung",
                    "en": "Description"
                ]
            ],
            "vendor_id": [
                "type": "nullable|string",
                "label": [
                    "de": "Lieferanten-Nr.",
                    "en": "Vendor ID"
                ]
            ]
        ]
    ]
);

Last updated: