1 00:00:00,630 --> 00:00:04,540 We now have a fancy front end form to create a new survey. 2 00:00:04,590 --> 00:00:10,620 And we have a back and post request route handler to accept that survey and send it out to the outside 3 00:00:10,620 --> 00:00:11,220 world. 4 00:00:11,430 --> 00:00:14,520 So we've got a huge part of our application now finished. 5 00:00:14,520 --> 00:00:19,470 It's time to start thinking about closing it up and wrapping up with some of the additional remaining 6 00:00:19,470 --> 00:00:20,220 features. 7 00:00:20,370 --> 00:00:23,330 So we really have to last big things to take care of. 8 00:00:23,340 --> 00:00:27,480 First off we need to make sure that we show a list of all the different surveys that have been created 9 00:00:27,780 --> 00:00:28,940 on our dashboard. 10 00:00:29,130 --> 00:00:33,840 And then we also have to make sure that whenever a user clicks on one of the links inside of an e-mail 11 00:00:34,110 --> 00:00:41,430 we record either a positive yes feedback or a no negative feedback for this very particular survey. 12 00:00:41,730 --> 00:00:43,990 And so this is what we're going to be taking care of right now. 13 00:00:44,010 --> 00:00:49,080 We're going to make sure that whenever a user clicks on one of these links inside of these e-mails we 14 00:00:49,080 --> 00:00:53,130 record some amount of feedback to the appropriate survey. 15 00:00:53,310 --> 00:00:58,410 Now we spoke very briefly some time ago in the past when we were putting together our back and route 16 00:00:58,440 --> 00:01:04,750 handler to create a new survey about exactly how we would receive feedback from the email. 17 00:01:04,770 --> 00:01:10,260 Remember we had said that we would enable click tracking side of our emails. 18 00:01:10,260 --> 00:01:16,860 We did that inside of our mailer that tells send grid to automatically replace every single anchor tag 19 00:01:16,950 --> 00:01:24,660 inside of our e-mail with a custom link when it does that and someone clicks on a link Saenger then 20 00:01:24,660 --> 00:01:30,630 knows exactly who clicked on the link and which clip link they clicked on either the yes or no link 21 00:01:30,630 --> 00:01:31,920 inside the e-mail. 22 00:01:32,040 --> 00:01:37,230 And so we had said that at some point in time Sandri would send us a message telling us hey here's some 23 00:01:37,230 --> 00:01:40,470 details about a click that just occurred inside of one of your e-mails. 24 00:01:40,530 --> 00:01:46,880 And so it can be up to our API server to process that notification from Send grid and we can record 25 00:01:46,890 --> 00:01:49,640 it somewhere inside of our Mongo database. 26 00:01:49,650 --> 00:01:54,260 So this process right here receiving this feedback can send grid is what I want now. 27 00:01:54,270 --> 00:01:59,760 Dive into a lot greater detail on because setting up this relationship is going to be just a little 28 00:01:59,760 --> 00:02:01,410 bit challenging. 29 00:02:01,410 --> 00:02:06,810 Now this relationship having said grid send an automated message to our back end server. 30 00:02:06,810 --> 00:02:09,840 Remember that we refer to this as a web hook. 31 00:02:09,870 --> 00:02:15,540 So I Web hook is any time that one server makes some communication to another server because of some 32 00:02:15,540 --> 00:02:21,150 event that occurred on the first one we're going to learn a little bit about how web hooks work and 33 00:02:21,210 --> 00:02:25,920 in particular about how they differ between the production and development environments. 34 00:02:25,920 --> 00:02:30,090 So let's dive into that in the next section so I'll see you in just a minute.