Approval Variables and Templates
Approval notifications (emails and messages) can be customized with pre-defined variables to provide dynamic content.
Approval Variables
Approval variables are data evaluations in the template that are delimited by {{
and }}
.
The following variables are available to be used in creating alert notifications(message, email subject, email content).
Variable | Description |
---|---|
{{ .ApprovalID}} | Unique ID of the approval. |
{{ .ApplicantName}} | Name of applicant. |
{{ .Event}} | Can be API Product Subscription , or Developer Sign Up |
{{ .AppliedAt}} | Time of the submission |
{{ .ResourceName}} | Name of event related resource. API Product for API Product Subscription , Developer for Developer Sign Up |
AppliedAt
can customize [time format]:(https://go.dev/src/time/format.go)
{{ .AppliedAt.Format }}
Templates
Message(JSON)
"applicant": "{{.ApplicantName}}"
"timestamp": "{{.AppliedAt.Format "2006 Jan 02 15:04:05"}}"
"id": "{{.ApprovalID}}"
"event": "{{.Event}}"
"resource": "{{.ResourceName}}"