Appsmith is an open-source internal tool builder that allows teams to quickly and easily build a UI to help improve their business operations. When combined with CData Connect AI, you gain immediate access to SAP SuccessFactors data for business applications. This article outlines the process of connecting to SAP SuccessFactors using Connect AI and creating a basic application from SAP SuccessFactors data within Appsmith.
CData Connect AI offers a pure SQL Server, cloud-to-cloud interface for SAP SuccessFactors, enabling the creation of business applications directly from live SAP SuccessFactors data within Appsmith, all without the need for data replication to a native database. As you build applications, Appsmith generates SQL queries to gather data. With its inherent optimized data processing capabilities, CData Connect AI efficiently channels all supported SQL operations, including filters and JOINs, directly to SAP SuccessFactors. This leverages server-side processing to swiftly deliver the requested SAP SuccessFactors data.
Configure SAP SuccessFactors Connectivity for Appsmith
Connectivity to SAP SuccessFactors from Appsmith is made possible through CData Connect AI. To work with SAP SuccessFactors data from Appsmith, we start by creating and configuring a SAP SuccessFactors connection.
-
Log into Connect AI, click Sources, and then click Add Connection
π Adding a Connection
- Select "SAP SuccessFactors" from the Add Connection panel
π Selecting a data source
-
Enter the necessary authentication properties to connect to SAP SuccessFactors.
You can authenticate to SAP Success Factors using Basic authentication or OAuth with SAML assertion.
Basic Authentication
You must provide values for the following properties to successfully authenticate to SAP Success Factors. Note that the provider will reuse the session opened by SAP Success Factors using cookies. Which means that your credentials will be used only on the first request to open the session. After that, cookies returned from SAP Success Factors will be used for authentication.
- Url: set this to the URL of the server hosting Success Factors. Some of the servers are listed in the SAP support documentation (external link).
- User: set this to the username of your account.
- Password: set this to the password of your account.
- CompanyId: set this to the unique identifier of your company.
OAuth Authentication
You must provide values for the following properties, which will be used to get the access token.
- Url: set this to the URL of the server hosting Success Factors. Some of the servers are listed in the SAP support documentation (external link).
- User: set this to the username of your account.
- CompanyId: set this to the unique identifier of your company.
- OAuthClientId: set this to the API Key that was generated in API Center.
- OAuthClientSecret: the X.509 private key used to sign SAML assertion. The private key can be found in the certificate you downloaded in Registering your OAuth Client Application.
- InitiateOAuth: set this to GETANDREFRESH.
π Configuring a connection (Salesforce is shown)
-
Click Save & Test
-
Navigate to the Permissions tab in the Add SAP SuccessFactors Connection page and update the User-based permissions.
π Updating permissions
Add a Personal Access Token
When connecting to Connect AI through the REST API, the OData API, or the Virtual SQL Server, a Personal Access Token (PAT) is used to authenticate the connection to Connect AI. It is best practice to create a separate PAT for each service to maintain granularity of access.
-
Click on the Gear icon () at the top right of the Connect AI app to open the settings page.
-
On the Settings page, go to the Access Tokens section and click Create PAT.
-
Give the PAT a name and click Create.
π Creating a new PAT
-
The personal access token is only visible at creation, so be sure to copy it and store it securely for future use.
With the connection configured and a PAT generated, we are ready to connect to SAP SuccessFactors data from Appsmith.
Create an Appsmith Application from live SAP SuccessFactors Data
To establish a connection from Appsmith to the CData Connect AI Virtual SQL Server, follow these steps:
Connect to SAP SuccessFactors in Appsmith
-
Log in to your Appsmith instance and create a new application.
-
In the new application, open the Data page and select Bring your data.
π Open the Data page
-
On this page, you can search for Microsoft SQL Server and select it as your data source.
π Select Microsoft SQL Server datasource
-
Enter a name for the new data source and then enter the following connection settings:
-
Click Test configuration to confirm a successful connection, then click Save to save the datasource.
Create a new query
With a connection configured to a datasource, we can add a SQL query to actually retrieve data from the data source.
-
On the screen with the new data source, click New Query.
π Create a New Query
-
This opens the Query Editor to enter a SQL query to select data. To assist with specifying a SQL query, use the Explorer of CData Connect AI to preview the SQL queries and the data you want to retrieve.
π Preview queries in the Explorer
-
After creating the SQL query, return to the Query Editor in Appsmith and enter the SQL query, then click Run.
π Run the SQL query
-
Once the query successfully runs, all that remains is to set up the Page to display the data retrieved.
Display SAP SuccessFactors data
-
Open the UI tab and click New UI element.
π New UI element
-
Choose a new UI element to grab, then drag and place the element on the page.
π New UI element
-
Click Connect data on the new UI element, then select the query previously created.
π Connect to data
-
With the data connected, it is then displayed in the UI element.
π UI element connected
Deploy the application
With the SAP SuccessFactors data connected to the UI elements in the application, we can deploy the Application. To do this, click Deploy in the top-right corner of Appsmith, then the application is opened in a separate window displaying the SAP SuccessFactors data.
π Application deployed
Get CData Connect AI
To get live data access to hundreds of SaaS, Big Data, and NoSQL sources directly from your cloud applications, try CData Connect AI today!