Skip to main content

GUEST/IDM/CONNECT

Visit Approval Notification - Missing Approver

Description

This email is sent to Guest Administrators when a visit is scheduled that requires approval but there are no identities that hold the approval role configured in the Visit Approval workflow.

Email
email_2.png
Template

<p>
  A visit has been registered by <b>@Model.HostFullName</b> which requires approval, however the required approver does not exist in the system. 
    
  <ul>
    @foreach(var approverDetail in @Model.MissingApproverDetails) {
      <b>@string.Format("<li>{0}</li>", approverDetail)</b>
    }
  </ul>    
    <br/>
    Please click <a href="@Model.Url">here</a> to review the visitor approval task, or copy and paste the following URL into your favorite browser:
    <br/>
    @Model.Url
</p>
Razor Elements

Element

Description

@Model.HostFullName

The first and last name of the host

@Model.MissingApproverDetails

The role that the missing approver should hold

@Model.Url

The link to the Visit Approval task

Warning

It is recommended that these elements be used as stated with the only edits being to remove them if the information generated is not required.

Using Razor Elements in Loops

Razor elements may be defined as part of a @foreach loop to iterate through a collection.

Example:

@foreach (var credentialsForDayLeft in Model.CredentialsByDayLeft)

In the example above:

  • Model.CredentialsByDayLeft is the collection provided by the template model

  • credentialsForDayLeft is a Razor element created for iteration

  • The element represents an individual item from the collection

Note

Razor elements created within a loop are locally scoped.

  • These elements are only available within the loop in which they are defined

  • They are not part of the main Model

  • They cannot be referenced outside of the loop

Additional Information:

  • Razor elements referencing @Model properties are available throughout the template.

  • Razor elements defined within loops are intended for temporary use when iterating through collections.

  • To reference data outside of a loop, use the appropriate @Model element.

Warning

Razor elements defined within a loop (for example, @credentialsForDayLeft) must only be used within that loop. Attempting to reference these elements outside of their scope will result in an error.