Creating a custom connector NOTE: We have a video on how to create a custom connector. Click here to watch. This custom connector facilitates the link between Power Apps / Power Automate and Sage 200. To set this custom connector up, visit make.powerautomate.com and sign in using the Microsoft 365 account you used when creating the Microsoft Entra enterprise application (Azure Active Directory application). Note: you can also set this up from powerapps.microsoft.com. The custom connector will be shared between both Power Apps and Power Automate. After logging in, go to Data then Custom Connectors on the left hand side. In the top right hand corner, select 'New customer connector', then select Import an Open API file. Give the connecter a name, such as Sage 200 Custom Connector.
Select Import and browse to the Custom connectors folder from the zip file you downloaded. Select the Sage 200.PowerApps.swagger.json file, select Open, then select Continue. Once the file has uploaded, you’ll see the General Information page: Note: You must have the leading / in the Base URL. Do not leave this out. Next, choose Security. Set the authentication type to OAuth 2.0. In the OAuth 2.0 settings: - Set the Identity provider to Azure Active Directory.
- The Client id will be the application (client) id you copied when setting up the Microsoft Entra enterprise application (Azure Active Directory application).
- The Client secret will be the secret key you copied when setting up the Microsoft Entra enterprise application (Azure Active Directory application).
- Set the Resource URL to https://SageCSPEU.onmicrosoft.com/6ce3bbc5-d381-4d11-b079-50accd62241a
- Do not change the Login URL, Tenant ID and Scope.
Once you’ve finished, click on Create connector at the top. Allow a few minutes for the connector to be created. You must then copy the Redirect URL and make sure you record this somewhere like a notepad file. Keep this safe, as you’ll need to update the Microsoft Entra enterprise application (Azure Active Directory application) you created before with this Redirect URL. It should look like this: To update the Redirect URL, go to entra.microsoft.com. Log in with your Microsoft 365 email address and password. Go to Identity > Applications > App Registrations. Select the application you created before, then choose Authentication. Click on Add a platform, choose Web and paste the Redirect URI in the relevant field. Click Configure, then Save the application. Now, go back to your Customer Connector and go to the Test tab. From here click on New Connection, then click on Create. NOTE: You may be asked to sign in with your Microsoft 365 account. You must accept the terms and conditions.
Your custom connector will be listed here. Select custom connectors and click on the pencil icon. Now move to the test tab and select the option of GetSites from the list of operations on the left hand side. Once this has been highlighted, copy your subscription key into the ocp-apim-subscription-key field. Click on test operation. This may take a couple of minutes to complete. Look at the test response field. You should see the following: - The status is OK (200)
- The body will show details of your companies in Sage 200.
- At this point, copy the company_id and site_id for each company listed. You’ll need these details when setting the flows up. An example of what you should see is below.
If you get a status of OK (200) but the body is empty this may be due to: - Sage 200 Professional server is not running.
- You have not set up 200 to connect with Microsoft 365 and assigned a Microsoft email address to a user within Sage 200.
- The Native API application has not been created in Microsoft Entra ID (Azure Active Directory).
NOTE: To assign a user API access, see Set up user email addresses in Sage 200 (Sage 200 Professional) or Set up user email addresses in Sage 200 (Sage 200 Standard / Sage for Education). You can now click Close. You have now successfully set up the custom connector. For more details of Power Automate setup, see Set up Microsoft Power Automate with Sage 200 (Professional) or Set up Microsoft Power Automate with Sage 200 (Sage 200 Standard / Sage for Education). To see how to import and set up one of the demonstration Flow, see Sage200 - Power Automate Demonstration Application. To see how to import and set up the demonstration PowerApp, see Sage 200 - Power Apps Demonstration Application.
Sage Business Partners can now log new cases online!If you're unable to find the help you require from our online resources, log a new case with us without having to use phone or email. Simply select 'Manage your cases' from the dashboard or visit my.sage.co.uk/cases. [BCB:19:UK - Sales message :ECB]
|