Skip to main content

GUEST/IDM/CONNECT

Visit Approval Approver Notification

Description

This email is sent to visit approvers to notify them of a new visit that has been registered that requires approval. This email will list the host that scheduled the visit and also the visitors that the visit was scheduled for it will also provide a justification for the visit. If any visitors match watchlist suspects, an indication will be included in the email.

Email

Note

An example of the email when a single visitor requires approval.

email_3.png
Template
Single Visitor:
<p>
    A visit has been registered by <b>@Model.HostFullName</b> for <b>@Model.VisitorFullName</b> which requires your approval. Please click <a href="@Model.Url">here</a> to review the pending visit, or copy and paste the following URL into your favorite browser:
    <br/>
    @Model.Url
</p>
@if(!string.IsNullOrEmpty(@Model.VisitJustification)) {
    <p>
        <b>@string.Format("{0} {1}", "Visit Justification:", @Model.VisitJustification)</b>
    </p>
}

@if(@Model.WatchlistWarning) {
    <p>The visitor might be on the watch list</p>
}
Group Visit:
<p>
	A visit has been registered by <b>@Model.HostFullName</b> for 
    
	<ul>
	@foreach(var visitorFullName in @Model.VisitorsFullNames) {
        <b>@string.Format("<li>{0}</li>", visitorFullName)</b>
    }
	</ul>    
     which requires your approval. Please click <a href="@Model.Url">here</a> to review the pending visit, or copy and paste the following URL into your favorite browser:
    <br/>
    @Model.Url
    <br/>
	@if(!string.IsNullOrEmpty(@Model.VisitJustification)) {
        <b>@string.Format("{0} {1}", "Visit Justification:", @Model.VisitJustification)</b>
    }
</p>
@if(Model.WatchlistWarning) {
    <p>@string.Format("{0}", "One or more visitors might be on the watch list")</p>
}
Razor Elements

Element

Description

@Model.HostFullName

The first and last name of the host

@Model.MissingApproverDetails

The first and last name of the visitor

@Model.VisitJustification

The justification for the visit

@Model.Url

The URL to the visit

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.