Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

Info
NOTE: You must be using Design Studio (not Cloud Studio) to use an OData API with Salesforce Connect.

These steps describe how to set up and configure API Manager to expose data in an easy-to-consume, secure form so that Salesforce Connect (formerly Salesforce Lightning Connect) will consume and display the data in real-time.  This example will expose and display data from an SAP source via the OData 2.0 protocol.

Note: Salesforce Connect (formerly Salesforce Lightning Connect) requires the OData 2.0 protocol.

Step 1: Create a New Environment in Harmony Web Management Console

Step 2: Create a New Project and a New Operation Under the New Environment

Step 3: Set Up and Expose the OData 2.0 API in the Web Management Console

Step 4Set up Salesforce Connect

Anchor
Create OData API Step 1
Create OData API Step 1
Step 1: Create a New Environment in Harmony Web Management Console

  • Log in to the Jitterbit Harmony Web Management Console.
  • Create a new environment specifically for the API. The new environment will allow you to work completely independently from any other project that already exists or any new projects created in the future.

  • Select Menu.
  • Select Environments in the drop-down menu.
  • Select the button in the upper right corner of the Environments page.
  • The Add Environment pop-up displays.

  • Enter the Name you would like to use for the environment in the Name field. The name assigned to the newenvironment will become the URL prefix for the API you create (e.g. development, test, sandbox, production, etc.). Take care not to use any special characters and keep it short for ease of use.
  • Note: The company name used to register your organization with Jitterbit Harmony will become part of the URL for each API you create. Please contact Jitterbit Support if you need to adjust the company name.
  • Click the Associate Group drop-down arrow.
  • Select the Jitterbit Cloud Agent Group or your local on-premises agent group. Both the Jitterbit Cloud Agent Group and local on-premises agent groups are fully supported by the API Manager. For this example, the Jitterbit Cloud Agent Group is selected.
  • Click the Save button.

  • The new environment is now available for use and is listed on the Environments page.
  • The next step is to create a new project and a new operation in Design Studio under the new environment you just created.

Anchor
Create OData API Step 2
Create OData API Step 2
Step 2: Create a New Project and a New Operation Under the New Environment

  • Log in to the Jitterbit Design Studio.

  • Select the New Project tab at the bottom of the screen.

  • Enter the Name you would like to use in the Project Name field. The project name for this example is JohnAPIDemo.
  • Select the appropriate Organization from the drop-down list.
  • Select the new environment you just created in the Environment drop-down list.
  • Click the   button.

  • Click on the   icon in the main toolbar at the top of the Design Studio screen.

  • Select the API Entity Operation radio button from the list of options.

  • Select the Create a new Jitterbit Entity radio button.
  • Click the Next button at the bottom of the pop-up window.

  • Select the appropriate radio button to choose the Source you want to work with. For this example, select the SAP radio button.
  • Click the Next button at the bottom of the pop-up window to continue.
  • If you need to, click the Back button to return to a previous screen and make changes or click the Cancel button to exit the Create a Jitterbit Entity Wizard entirely.

  • Click the Available SAP Endpoints drop-down arrow.
  • Select either Create New or select an existing endpoint from the drop-down list.  For this example, Create New was selected.

  • Enter the appropriate credentials for your source SAP system in the Host, Login, System number and Client fields.
  • Click on the Password button, Enter the password and Press Return.
  • Click on the button to ensure that your credentials are valid. The Testing Connection pop-up window displays followed by the Success pop-up window once the connection is successful.
  • Click Next to continue.

  • Enter characters in the Name Contains field to filter the query. In this example we entered KNA to filter on customer tables. Leave the Name Contains field blank to view all available objects or tables.
  • Select the Object Type from the drop-down list.  In this example Tables Only is selected.
  • Click on the button to display the list of available objects or tables.
  • Click on the Name of the Object or Table in the list to create the required data set. In this example, the KNA1 table is selected which contains the customer master information.
  • Click Next to continue.

  • Enter partial/full field names in the Find field to display the list of fields available in a particular category.  Leave the Find field blank to display all fields available in the previously selected object or table.
  • Click on the associated checkbox to Select each field to include in the data set.
  • You can enter multiple field names in the Find field and select multiple fields from each resulting list. 
  • Click the Always show selected fields checkbox to continue to display all previously selected fields as you cycle through multiple field lists.
  • In this example we entered City, Address, Name, Country, and Customer in the Find field and selected multiple fields from each list.
  • Click Next to continue.

  • Jitterbit created a new Entity based on the previous selections.
  • Enter the Name you would like to use in the Entity Name field. In this example we named the entity Customers.
  • Note: The Entity Name must be a single word. Customers that access the API will be able to see the name as well.
  • Click the associated checkbox to Select one field as the Primary field to be the unique key that identifies the entity or the new object.
  • In this example the Customer field is selected as the unique key.
  • Note: If the returned data includes duplicate records with the same primary value or records without primary values, such data may be skipped at run-time.
  • Click Next to continue.

  • Jitterbit creates a pass through operation by default.
  • Click the Request Transformation and/or the Response Transformation checkbox if custom mapping is required. In that case, Click Next and the Entity Wizard will display request and/or response structures allowing you to continue mapping the fields appropriately.
  • In this example we have opted for the basic pass through operation and did not check either checkbox.
  • Click Finish.
  • Jitterbit creates and saves the entity and the operation. The entity and operation are now available to use.
  • The Operations tab and Jitterbit Entities tab display in Design Studio.

  • Select the Operations tab.
  • To complete the operation, Click on the Image Removed  icon in the toolbar in the upper right corner of the screen.  The operation is deployed to the environment created specifically for this API in previous steps outlined above.

Image Removed

  • Click on the Jitterbit Entities tab to review your new entity.:

Image Added

  • The Entity may be revised in the future by adding or removing fields, changing the Primary field to be used as the unique key that identifies the entity, or changing the endpoint the entity connects to.
  • Select the Operations tab.
  • To complete the operation, Click on the Image Added  icon in the toolbar in the upper right corner of the screen.  The operation is deployed to the environment created specifically for this API in previous steps outlined above.
  • The next step to create your API is to go back to the Web Management Console to expose the operation and entity as an OData 2.0 API (Salesforce Connect requires the OData 2.0 protocol.)

Anchor
Create OData API Step 3
Create OData API Step 3
Step 3: Set Up and Expose the OData 2.0 API in the Web Management Console

  • Log in to Jitterbit Harmony or Click the   icon on the Design Studio main  toolbar.

  • Select Menu in the WMC.
  • Select API Management in the drop-down menu.
  • Select OData Services in the side-bar menu.
  • Click the   buttonin the upper right-hand corner of the page.

API Summary

  • Click on the Environment drop-down arrow.
  • Select the Environment created specifically for this API in previous steps outlined above. The environment name will become part of the new API’s URL.
  • Enter the Name you would like to use for the new OData service in the Name field.
  • The name entered into the Name field is automatically reused not only for your own internal identification, but also as the public name of the API (aka service root).  The name will become part of the URL (changeable).
  • Define a version method for this API, and Enter the Version in the Version field. This is not required, but it is highly recommended. The V1, V2, etc. naming convention is often utilized. You have the ability to use anything alphanumeric for the version, including a date. The version will also become part of the URL to help you and your customers distinguish your various APIs in the future.
  • The configuration of the URL portion of the API is now complete.
  • View the API URL in the upper right corner of the page and notice the environment name, API name, and version name have been included. This is the URL that you and your customers will access to pull data (GET) from the API or push data (POST) into the API. 

Assigned Jitterbit Entities

  • Click on the Method Type drop-down arrow.
  • Select the Method from the drop-down list. For this example the Get method is selected.
  • Click on the Entity (Project) drop-down arrow.
  • Select the Entity created specifically for this API in the steps outlined above. For this example the Customers (JohnAPIDemo) entity is selected.
  • Click the API Operation drop-down arrow.
  • Select the Operation created specifically for this API in the steps outlined above. For this example the Customers operation is selected. When a GET request hits the API, the Customers operation will run. 
  • Click the Assign button to save the entries and assign the Method, Entity and Operation to the API.

Authentication

  • By default, anonymous access to each API is enabled, which allows all public access.
  • For this example, authentication profiles are not assigned to the API and anonymous access is enabled.
  • See Harmony API Security to review the levels of security available in API Manager and determine the level of security you would like to set up for API access.

Settings

  • Click the Timeout up and/or down arrows to set the timeout value desired, or leave the default value of 30 seconds.
  • See Harmony API Security to review the SSL and Debug Until settings and determine the level of security you would like to set up for access to the API. 
  • Click the Add button at the bottom of the page.

  • Your OData 2.0 API is now complete and publicly available.
  • Continue to Step 4 only if the API will be used with Salesforce Connect.

  • Copy the full URLof your new API (top-right corner) into memory (Ctrl+C or Cmd+C) in preparation to set up Salesforce.

Anchor
Create OData API Step 4
Create OData API Step 4
Step 4: Set up Salesforce Connect

Create New External Data Source and External Object

  • Enter the Name of the new API into the Label field.
  • Press the Tab key. 
  • The Name field is automatically populated with the Name of the new API. The API Label and Name can be the same.
  • Click the Type drop-down arrow.
  • Select Lightning Connect: OData 2.0  in the drop-down list.
  • Enter or Paste the full URL of your API (copied into memory in Step 3 above) into the Server URLfield.
  • Note: Make sure that the URL starts with HTTPS and not HTTP.  If you are using an HTTP URL, the data will not be protected when requested and sent back to Salesforce.
  • Select the additional Parameters as appropriate.

No Authentication

  • Click the Identity Type drop-down arrow .
  • Select Anonymous from the listif you did not select any Authentication profiles for your API.
  • Click the Authentication Protocol drop-down arrow.
  • Select No Authentication from the list.
  • For this example, Anonymous and No Authentication were selected.
  • Warning

    WARNING: It is imperative to set up a level of security for any API prior to going live.

Basic Authentication

  • Click the Identity Type drop-down arrow and Select Named Principal if you do have profiles assigned to the API and if you want to use a central name for all of your Salesforce users.
  • Click the Authentication Protocol drop-down arrow.
  • Select Password Authentication from the list if you do have security profiles assigned.
  • Enter the appropriate username and password.
  • Click the Save button.

  • Click the Validate and Sync button to check the URL, validate the format is acceptable and automatically create a new External Object in Salesforce.
  • Salesforce external objects are almost like any other custom object, except the data is not stored in Salesforce. The data is retrieved in real-time from the data source set. The external object supports APIs and other customization.  When using the external object, remember to always provide a filter/criteria for the data. (Go to https://help.salesforce.com/apex/HTViewHelpDoc?id=platform_connect_considerations_compatibility.htm&language=en_US  for additional information about Salesforce external objects.)

Create a New Tab in Salesforce

  • Select Build.
  • Select Create.
  • Select Tabs.
  • Click the New button in the Custom Object Tabs section.

  • Click the Object drop-down arrow.
  • Select the new external object you just created. In this example Customers is selected.
  • Customize the tab as desired.
  • Click Next.
  • Click Save.

  • Click on the new tab (in this example Customers).
  • Click on Create New View
  • Customize the View as desired.
  • Click Save.
  • In this example, the view is set to display all customers where Country = US.

  • The data is retrieved in real-time and is not being stored in Salesforce. You can drill down for more detail or change filters again as needed. API Manager will continue to service the requests in real-time and work together with Salesforce Connect to provide access to the data.


Panel
borderColor#65379B
titleColor#FFFFFF
titleBGColor#65379B
titleOn This Page
Table of Content Zone

Table of Contents
maxLevel3
minLevel2
indent20px

Panel
borderColor#FF7C4C
titleColor#FFFFFF
titleBGColor#FF7C4C
titleRelated Articles
Panel
borderColor#00B886
titleColor#FFFFFF
titleBGColor#00B886
titleRelated Topics
Content by Label
showLabelsfalse
max1000
showSpacefalse
sorttitle
cqllabel in ("live-api-overview","sf-connect-overview","design-studio-overview","wmc-overview","sap-overview") and space = "DOC"

HideElements
metastrue

Last updated: 

Lastmodifieddate