---Presenter: Eric WeatherSubject: Setting Up a New ConnectDuration: 00:07:21---00:00:06.020 --> 00:00:10.219 - In this video, we're going to be showing how to set up the 00:00:10.219 --> 00:00:14.095 - connect once you set up a new base connect. We're going to 00:00:14.095 --> 00:00:17.648 - have. We've already added our new connector here that can be 00:00:17.648 --> 00:00:21.524 - seen how to do that in a separate video, but we already 00:00:21.524 --> 00:00:25.077 - have that. It's pretty basic right now, but we're going to 00:00:25.077 --> 00:00:28.953 - set up show how to set up these projects with the proper 00:00:28.953 --> 00:00:32.829 - organizations for folders. Every file that we need and how to set 00:00:32.829 --> 00:00:34.767 - those up in the startup project 00:00:34.767 --> 00:00:40.238 - so. First thing we're going to do is we're going to Add all 00:00:40.238 --> 00:00:43.030 - of our necessary client specific ERP specific file 00:00:43.030 --> 00:00:46.869 - folders in here. So we're going to go to entities. We're 00:00:46.869 --> 00:00:50.010 - going to add a new folder called Cephei training 00:00:50.010 --> 00:00:50.359 - entities. 00:00:52.340 --> 00:00:55.108 - We're going to add a request handler called. 00:00:56.440 --> 00:01:00.823 - A new folder in the request handlers called Cephei 00:01:00.823 --> 00:01:04.719 - training request handlers and same thing for requests. 00:01:09.430 --> 00:01:15.832 - OK. So now we have our folders an if we had a separate 00:01:15.832 --> 00:01:20.408 - connector, so let's say we were connecting with dynamics CRM. We 00:01:20.408 --> 00:01:25.816 - would have a CRM connector up here and then we would create a 00:01:25.816 --> 00:01:27.896 - separate folder for CRMCVICRMSDCVICRM request 00:01:27.896 --> 00:01:32.056 - handlers, replacing the CV with whatever your client acronym is. 00:01:33.010 --> 00:01:35.830 - So for example, if it was I A, It would be IA. 00:01:36.890 --> 00:01:40.826 - Entities are IA CRM entities. I CRM request 00:01:40.826 --> 00:01:42.794 - handlers and so forth. 00:01:44.730 --> 00:01:48.140 - So next, we're going to go ahead and configure our 00:01:48.140 --> 00:01:51.891 - service, so we're going to add a folder here. New folder 00:01:51.891 --> 00:01:53.596 - we're going to call this. 00:01:54.890 --> 00:01:57.060 - Training service. 00:02:00.390 --> 00:02:04.097 - In the training service, we're going to add a class called. 00:02:05.250 --> 00:02:07.380 - Training service. 00:02:09.640 --> 00:02:11.215 - We're going to change this to be 00:02:11.215 --> 00:02:15.458 - a public class. And we're going to remove the training services 00:02:15.458 --> 00:02:19.490 - namespace down to just services we want it to be visible at 00:02:19.490 --> 00:02:23.858 - that level. Then we're going to similarly add a new item of an 00:02:23.858 --> 00:02:24.530 - interface called. 00:02:25.580 --> 00:02:27.950 - I training service. 00:02:29.610 --> 00:02:31.200 - We're going to make this public. 00:02:32.070 --> 00:02:35.355 - We're going to remove the namespace down to services. 00:02:35.355 --> 00:02:39.005 - Then we're going to take the training service and we're 00:02:39.005 --> 00:02:40.465 - going to implement it. 00:02:44.090 --> 00:02:48.066 - OK, so now that we have now that we have it implemented, the next 00:02:48.066 --> 00:02:49.770 - thing that we're going to want 00:02:49.770 --> 00:02:53.842 - to do is. Add it into our services container so we're 00:02:53.842 --> 00:02:56.966 - going to open up the services extension and we're going to 00:02:56.966 --> 00:03:00.374 - inject it into our services container so that we can use it 00:03:00.374 --> 00:03:04.350 - in the job service and will set that up as well. So the first 00:03:04.350 --> 00:03:08.042 - thing we're going to do is we're going to go to our clarity 00:03:08.042 --> 00:03:11.166 - connect. We're going to go to our service extensions and we're 00:03:11.166 --> 00:03:12.870 - going to go to our services 00:03:12.870 --> 00:03:16.694 - extension. We're going to add 00:03:16.694 --> 00:03:22.010 - scoped. I training service an training service. 00:03:24.330 --> 00:03:28.581 - It's very possible that you will need to add the reference to the 00:03:28.581 --> 00:03:31.851 - clarity connect services. I'm pretty sure we're going to set 00:03:31.851 --> 00:03:37.410 - that up as a base. It set up as a base, but you may need to do 00:03:37.410 --> 00:03:40.680 - that potentially if you're getting an error and you have 00:03:40.680 --> 00:03:44.931 - this added, make sure that you did not. You did not forget to 00:03:44.931 --> 00:03:48.528 - remove that training service or sorry or NetSuite service or CRM 00:03:48.528 --> 00:03:51.471 - services dot Sage Service whatever the extension was here, 00:03:51.471 --> 00:03:55.068 - we want just clarity connect dot services so that we already 00:03:55.068 --> 00:03:56.928 - have. Access to the namespace here we're using 00:03:56.928 --> 00:03:58.092 - it and we can add it. 00:03:59.490 --> 00:04:00.484 - All right, so we're going to add 00:04:00.484 --> 00:04:04.800 - that there. The next thing we do is we're going to take this that 00:04:04.800 --> 00:04:08.100 - we just added to the services and we're going to inject it 00:04:08.100 --> 00:04:11.125 - into our job service. So we're going to give ourselves a. 00:04:13.610 --> 00:04:19.778 - A variable here we're going to give this a private readonly I 00:04:19.778 --> 00:04:24.404 - training service. I'm going to call this training service. 00:04:25.970 --> 00:04:28.658 - OK, and then we're going to. 00:04:30.230 --> 00:04:34.663 - Add it into our constructor here. So we're going to do 00:04:34.663 --> 00:04:36.678 - inject and I training service 00:04:36.678 --> 00:04:39.270 - called training. Service 00:04:40.150 --> 00:04:41.920 - and then. 00:04:43.230 --> 00:04:47.470 - Set the value here, so training service equals training service. 00:04:48.540 --> 00:04:52.104 - OK, so now whatever, whatever methods that we create in our 00:04:52.104 --> 00:04:55.020 - eye training service and then implement in our training 00:04:55.020 --> 00:04:59.556 - service, we can call in any of these test jobs. OK, so the next 00:04:59.556 --> 00:05:03.444 - thing that we're going to want to do is we're going to. 00:05:05.010 --> 00:05:08.180 - Create our controllers folder so in our services were going 00:05:08.180 --> 00:05:11.350 - to add new folder and we're going to call this. 00:05:13.100 --> 00:05:14.420 - Controllers 00:05:16.510 --> 00:05:19.280 - right in the controllers and will create. I'm going to 00:05:19.280 --> 00:05:22.327 - create one later, but in controllers so for all of our 00:05:22.327 --> 00:05:25.651 - job services that we add here. So for example this test job. 00:05:25.651 --> 00:05:29.252 - This test job would not live here. This test job is going to 00:05:29.252 --> 00:05:32.299 - get moved to a test job controller file, which is a 00:05:32.299 --> 00:05:35.346 - partial class on the job service. So let's go ahead and 00:05:35.346 --> 00:05:37.285 - make this partial if it's not already. 00:05:38.640 --> 00:05:40.355 - So it's a partial class on the 00:05:40.355 --> 00:05:43.883 - job service. Every folder in every file inside the 00:05:43.883 --> 00:05:47.282 - controllers is going to be a public partial class. That way 00:05:47.282 --> 00:05:50.990 - has access to whatever we need here, and we're going to make 00:05:50.990 --> 00:05:55.007 - these calls, so this method is going to live in one of those 00:05:55.007 --> 00:05:58.715 - files so that we can have them organized and have have our 00:05:58.715 --> 00:06:00.569 - single responsibility for each file there. 00:06:02.070 --> 00:06:04.904 - OK, the next thing that we're going to do is we're going to 00:06:04.904 --> 00:06:07.738 - take a look here. We have CPI training is the last thing I 00:06:07.738 --> 00:06:10.354 - believe that we need to do is we're going to add our. 00:06:12.970 --> 00:06:17.962 - Options actually we have our options up here. Oh, we need to 00:06:17.962 --> 00:06:21.706 - add the training integration service to our services, so 00:06:21.706 --> 00:06:22.954 - we're going to. 00:06:24.520 --> 00:06:29.057 - We are going to go back to our services extensions and the last 00:06:29.057 --> 00:06:31.500 - thing we're going to add here is 00:06:31.500 --> 00:06:33.920 - a dot. Um? 00:06:34.870 --> 00:06:36.160 - Add scoped. 00:06:40.040 --> 00:06:44.715 - This is going to be an AI integration service. This is 00:06:44.715 --> 00:06:49.390 - coming from the clarity shared namespace and we're going to add 00:06:49.390 --> 00:06:53.215 - the training integration service. We're going to have to 00:06:53.215 --> 00:06:57.465 - add a reference to our ad reference to clarity dot 00:06:57.465 --> 00:06:59.165 - training dot services namespace. 00:07:02.370 --> 00:07:06.127 - And there we go. Now we have that injected and we're good to 00:07:06.127 --> 00:07:09.884 - go. That's it. On setting up the base here will get into each 00:07:09.884 --> 00:07:14.570 - individual addition. Here in a bit another another videos, but 00:07:14.570 --> 00:07:19.900 - that is the basis for setting up an organizing a new concrete of 00:07:19.900 --> 00:07:21.540 - a train a connector.