Set up the application to onboard partners

 

Important

Microsoft Azure BizTalk Services (MABS) is being retired, and replaced with Azure Logic Apps. If you currently use MABS, then Move from BizTalk Services to Logic Appsprovides some guidance on moving your integration solutions to Logic Apps.

If you're brand new to Logic Apps, then we suggest getting started here:

This topic provides information on an ASP.NET application that uses the Trading Partner Management OM API to enable partners, such as Fourth Coffee restaurant, to onboard themselves as trading partners in the BizTalk Services Portal under the BizTalk Services subscription of Contoso, Ltd. The ASP.NET application uses the Trading Partner Management Object Model (TPM OM): API Reference API to create partners, create business profiles for the partner, and add custom data for the partner such as dining menu items, their description and prices, etc.

This topic does not go into the detail of creating the application. Instead, you can download the PartnerOnboarding application from the MSDN code gallery at https://go.microsoft.com/fwlink/p/?LinkId=390146.

Prerequisites

Ensure that the following requirements are met on the computer where you use the partner onboarding application.

  • Install Visual Studio from https://msdn.microsoft.com/library/dd831853.

  • Install WCF Data Services from https://www.microsoft.com/download/details.aspx?id=29306.

  • Get the REST endpoint for the TPM OM API. This is required to discover the TPM OM entities like partners, business profiles, etc. and then perform actions like creating a partner, creating a business profile, etc.

    Typically, if the BizTalk Services subscription name for Contoso, Ltd. is mybiztalkservice (as an example), the REST endpoint for discovering the TPM OM entities will be https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement.

  • Install the certificate that was used to provision BizTalk Services using the Azure classic portal.

How to use the PartnerOnboarding application

To understand how to create an application that uses the TPM OM API, see Creating .NET Applications Using TPM OM REST API. The first step is to generate a context to the WCF Data Services-based REST endpoint by adding a service reference to the endpoint https://mybiztalkservice.biztalk.windows.net/default/$PartnerManagement, where mybiztalkservice is the name of your BizTalk Services subscription. Once you have done that, you can use the generated context to access the TPM OM entities such a Partner, BusinessProfile, etc. To get a list of all the TPM OM entities, see TPM OM API: Exposed Entities and Properties.

The PartnerOnboarding sample already includes the generated TPM context. However, you must provide the endpoint for Contoso’s BizTalk Services subscription, and other associated details, to create partners in Contoso’s BizTalk Services environment. You must also provide the correct ACS endpoint address, issuer name, and issuer key. This is required to perform secure operations against the BizTalk Services endpoint.

You can provide these values for the baseUri, acsAddress, issuerName, and issuerKey variables in the PartnerController.cs class of the PartnerOnboarding sample.

Note

The PartnerOnboarding application provides the capabilities to onboard different kinds of service providers as partners, such as partners offering fuel services, tire services, etc. However, for the purpose this tutorial, we only look at the food category. So, even though the code to onboard partners of other categories is available in the sample, it is commented out. You can un-comment the code snippets in Index.cshtml and SupplierCatalog.cs to light up the capabilities to onboard other service partners as well.

Run the application

After you have made the required changes to the application code, build and run the application to add a partner for Contoso, Ltd. Once the web page launches, provide the following details:

  1. For Name, enter FourthCoffee and provide a description.

  2. Select Food as the category.

  3. Provide a URL for the logo image for your restaurant. You must add a logo because this will be used to point the location of the supplier on the map.

  4. Select Fetch your coordinates to determine your exact position. These coordinates are also included as custom data while adding the partner in Contoso, Ltd.’s BizTalk Services environment.

  5. Select Add Item and add the menu items (item name, item description, item price, and a photo of the food item) that Fourth Coffee offers. The photo you upload will be visible to the customers from their Windows 8 application, while they place the order.

  6. Select Submit.

    Create partner

Once the partner is successfully added, a message is displayed on the web page.

See Also

Using BizTalk Services from a Windows 8 Application