Zwing Docs

Template Master

Template documents, ACS templates API, and connector–event template fields

Purpose

Template Master stores reusable template documents keyed by channel and tenant. They support transform and mapping tasks (and connector–event level template / templateId fields) without hard-coding strings only in mappings.

The DIP UI Template section (/template-master/list in g1-dip-frontend) performs list/create/preview against ACS /acs/templates.

TemplateModel (@libs/dip-v2)

FieldMeaning
nameDisplay name.
ssoEnterpriseIdOwning enterprise (empty/absent semantics as enforced by ACS).
channelTemplateChannel enum — separates template kinds.
blobPathStorage location of template body (e.g. file in object storage).
providerIdOptional provider identifier.
keysArbitrary metadata map (e.g. variable lists for preview).

Index on { ssoEnterpriseId, channel } supports listing by tenant and channel.

Connector–event mapping linkage

On ConnectorEventMappingModel:

  • template — Inline template string or handle (also used when cloning from default mappings).
  • templateId — Logical id (e.g. ERP template code) consumed by mapping tasks via TaskConfigDto.templateId (Task types reference).

Mapping tasks resolve content using Template Master rows as implemented in egress MappingTaskExecutor / related services (follow blobPath and keys in code for exact resolution rules).

ACS

  • Controller: apps/app-connector-service/src/http/controllers/template.ts (@Controller('templates') under /acs).
  • Swagger tag: templates — see /acs/swagger-api for operations and request bodies.
Edit on GitHub