Friday, 30 November 2018

IOT Based Smart Parking System -- Integration between ServiceNow and Live Sensors Part 2



Business Rule: Create Incident based on Time and status
On Custom table.

          var gr = new GlideRecord('incident');
          gr.initialize();
          gr.caller_id = gs.getUserName();
          gr.short_description = 'Light is on the floor';
          gr.assignment_group = "5f6441efc0a8010e0177fcb589156352";
          gr.assigned_to = "63b4c2cd0bb23200ecfd818393673a95";
          gr.impact= "1";
          gr.urgency= "2";
          gr.insert();


Business Rule: Send mail on incident creation

gs.eventQueue('incident.commented', current, gs.getUserID(), gs.getUserName());



Email Notification: CreateAThonNOtification fired based on event

Template:

EmailTemplate

Subject:
Light is on the Floor Incident No ${current.number}

Body:
<p>&nbsp;</p>
<table style="width: 100%; border-top: 1px solid #909090; border-bottom: 1px solid#909090;">
<tbody>
<tr style="font-family: Calibri; background-color: #239604; width: 100%; color: #ffffff; text-align: center; font-size: 24px;">
<td><strong>Light-On Notifiation</strong></td>
</tr>
</tbody>
</table>
<p>Hi,</p>
<p style="font-family: Calibri; color: black;">You have been assigned the following incident to turn off the light.<br />Please check below the details</p>
<p>&nbsp;</p>
<table style="width: 60%; background-color: #ccf3f1;">
<tbody>
<tr>
<td style="font-family: Calibri; color: #0c090a; font-weight: bold;">Incident Number :</td>
<td style="font-family: Calibri;" colspan="4">${URI_REF}</td>
</tr>
<tr>
<td style="font-family: Calibri; color: #0c090a; font-weight: bold;">Short Description :</td>
<td style="font-family: Calibri;" colspan="4">${current.short_description}</td>
</tr>
</tbody>
</table>
<p>This is system generated mail please do not reply on this.</p>
<p>&nbsp;</p>





3 comments:

  1. Useful content. Thanks for Sharing. It shows your indepth knowledge on the subject. Pls keep updating.

    ahmedabadclassifieds
    Technology

    ReplyDelete
    Replies
    1. Thank you!
      We will try our best to update with more content.
      You will receive notification for all the update if you follow this website.

      Regards

      Delete
  2. In general, parking takes up a significant time of your everyday routine, so some smart hacks can go a long way. We gathered some simple, but effective tips to help our guests save time. Reverse parking When parking in crowded places, like events or grocery shopping, you might often find yourself getting stuck and delayedparking lot

    ReplyDelete