Nav

SAP SuccessFactors Connector

Select

The Mule Connector for SuccessFactors provides full support to query, create, update, and delete entities using the ODATA API exposed by SuccessFactors.

This connector lets you perform operations to:

  • Create, update, and delete entities.

  • Retrieve a single entity or query multiple entities.

Note: This connector is not supported for use with Anypoint Design Center.

Prerequisites

This document assumes that you are familiar with SuccessFactors, Mule, Anypoint Connectors, and the Anypoint Studio Essentials.

To use this connector you need the following:

  • A developer account or other valid SAP SuccessFactors instance.

  • MuleSoft Enterprise License.

For hardware and software requirements and compatibility information, see the Connector Release Notes.

To use this connector with Maven, view the pom.xml dependency information in the Dependency Snippets in Anypoint Exchange.

What’s New in this Connector

This version of the connector adds support for Mule 4.x.

This connector supports ODATA API exposed by the SuccessFactors.

Supported Operations

The SuccessFactors connector supports the following outbound operations:

  • Create Entity

  • Delete Entity

  • Get entity by merge

  • Query

  • Update Entity By Merge

  • Update Entity By Replacement

Connect in Anypoint Studio 7

You can use this connector in Anypoint Studio by first downloading it from Exchange and configuring it as needed.

Install Connector in Studio

  1. In Anypoint Studio, click the Exchange icon in the Studio taskbar.

  2. Click Login in Anypoint Exchange.

  3. Search for this connector and click Install.

  4. Follow the prompts to install this connector.

When Studio has an update, a message displays in the lower right corner, which you can click to install the update.

Configure in Studio

  1. Open your Mule project in Anypoint Studio.

  2. Add the connector as a dependency in the pom.xml file:

    
                 
              
    1
    2
    3
    4
    5
    6
    
    <dependency>
        <groupId>com.mulesoft.connectors</groupId>
        <artifactId>mule-sap-successfactors-connector</artifactId>
        <version>3.0.0</version>
        <classifier>mule-plugin</classifier>
    </dependency>

To Configure the SuccessFactors Connector Global Element

To use the SuccessFactors connector in a Mule application, you must configure a global SuccessFactors configuration element that can be used by as many SuccessFactors connectors as you require for your application.

  1. Click the Global Elements tab at the base of the canvas.

  2. In the Global Configuration Elements screen, click Create. Following window would be displayed.

    Global Element Configuration Wizard

  3. In the Choose Global Type wizard, expand Connector Configuration, select SuccessFactors connector Config, and click OK.

    The following configuration screen for Basic Connection appears.

    Basic Connection screen

  4. Configure these properties:

    Parameter Description

    CompanyID

    Your company ID

    User Name

    User name to connect

    Password

    Password to connect

    Data Center’s Endpoint URL

    SuccessFactors Web API URL

    Enable Session Reuse

    The session is alive.

    Notes:

    • In the Basic configuration screens above, the placeholder values refer to a configuration file mule-artifact.properties in the src/main/resources folder of your project.

    • You can either enter your credentials into the global configuration properties, or reference a configuration file that contains these values.

    • For simpler maintenance and better re-usability of your project, Mule recommends that you use a configuration file. Keeping these values in a separate file is useful if you need to deploy to different environments, such as production, development, and QA, where your access credentials differ.

  5. Click OK to save the global connector configurations.

Use Case: Set Up and Run in Studio

  1. In Anypoint Studio, click File > New > Mule Project.

  2. Specify a Project Name and click Finish.

  3. Search for "http" and drag the HTTP connector to the canvas. Click the green plus sign next to Connector Configuration, and click OK in the menu to accept the default values.

  4. Drag the SuccessFactors connector Operation to the canvas. Click the green plus next to Connector Configuration, and specify your access credentials.

  5. Click a connection strategy for authentication:

    • Basic Connection

To Configure Basic Connection

Configure Basic connection as described in the previous section, To Configure the SuccessFactors Connector Global Element.

To Run a Flow

  1. In Package Explorer, right click your project’s name, and click Run As > Mule Application.

  2. Check the console to see when the application starts. You should see messages such as these if no errors occur:


         
      
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
************************************************************
INFO  2018-07-14 22:12:42,003 [main] org.mule.module.launcher.DeploymentDirectoryWatcher:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Mule is up and kicking (every 5000ms)                    +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INFO  2018-07-14 22:12:42,006 [main] org.mule.module.launcher.StartupSummaryDeploymentListener:
**********************************************************
*  - - + DOMAIN + - -               * - - + STATUS + - - *
**********************************************************
* default                           * DEPLOYED           *
**********************************************************

************************************************************************
* - - + APPLICATION + - -   * - - + DOMAIN + - -  * - - + STATUS + - - *
************************************************************************
* myapp                     * default             * DEPLOYED           *
************************************************************************

Example: Success Factors

This example demonstrates the use of SuccessFactors Connector.

To build and run this demo project, you need:

  • Anypoint Studio with at least the Mule 4.0 Runtime.

  • SuccessFactors Connector v3.0.0 or later.

  • Credentials to send ODATA API requests.

To Test the Flow

  1. Import the demo project into your workspace using Anypoint Exchange or in Anypoint Studio using the Import command in the File menu.

  2. Specify your basic credentials in the /src/main/app/mule-app.properties file:

  3. Run the project in Studio.

  4. Type localhost:8081 in your browser to access the selection menu of the demo.

  5. Optionally you can configure the Connection Timeout and Read Timeout.

    The Connection Timeout is the timeout in making the initial connection with the server. The Read Timeout is the timeout on waiting to read data from the server.

You can use the selection menu from http://localhost:8081 to test the flows.

Use Case: Success Factors Operations

Operations Studio 7 Flow Operations Studio 7 Flow


         
      
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
xmlns:successfactors="http://www.mulesoft.org/schema/mule/successfactors"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/ee/core
http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd
http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http
http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/successfactors
http://www.mulesoft.org/schema/mule/successfactors/current/mule-successfactors.xsd">
  <http:listener-config name="HTTP_Listener_config" doc:name="HTTP Listener config" >
      <http:listener-connection host="0.0.0.0" port="8081" />
  </http:listener-config>
  <successfactors:config name="SuccessFactors_Configuration" doc:name="SuccessFactors Configuration" >
      <successfactors:basic-connection
              companyId="${config.companyId}"
              userName="${config.userName}"
              password="${config.password}"
              endpointUrl="${config.endpointUrl}"/>
      </successfactors:config>
      <configuration-properties file="automation-credentials.properties"/>

      <flow name="Query">
           <http:listener doc:name="Listener" config-ref="HTTP_Listener_config" path="/list"/>
           <successfactors:query entitySetName="VendorInfo" doc:name="Query"
           config-ref="SuccessFactors_Configuration" />
           <ee:transform doc:name="Transform Message">
               <ee:message >
                   <ee:set-payload ><![CDATA[%dw 2.0
   output application/json
   ---
   payload]]></ee:set-payload>
               </ee:message>
           </ee:transform>
           <logger level="INFO" doc:name="Logger" message="#[payload]"/>
       </flow>

           <flow name="Create-Entry">
           <http:listener doc:name="Listener" config-ref="HTTP_Listener_config" path="/createVendor"/>
           <ee:transform doc:name="Transform Message">
               <ee:message >
                   <ee:set-payload ><![CDATA[%dw 2.0
   output application/java
   ---
   {
       vendorCode: "XYZ123ABC",
       effectiveStartDate: "2018-07-08T00:00:00"  as DateTime,
       effectiveStatus: "I"
   }]]></ee:set-payload>
               </ee:message>
           </ee:transform>
           <successfactors:create-entity doc:name="Create entity"
           config-ref="SuccessFactors_Configuration" entitySetName="VendorInfo"/>
           <ee:transform doc:name="Transform Message" >
               <ee:message >
                   <ee:set-payload ><![CDATA[%dw 2.0
   output application/json
   ---
   payload]]></ee:set-payload>
               </ee:message>
           </ee:transform>
           <logger level="INFO" doc:name="Logger" message="#[payload]"/>
       </flow>

           <flow name="Get-Entity-by-Id">
           <http:listener doc:name="Listener" config-ref="HTTP_Listener_config" path="/getById"/>
           <ee:transform doc:name="Transform Message">
               <ee:message>
                   <ee:set-payload><![CDATA[%dw 2.0
   output application/java
   ---
   {
           effectiveStartDate: attributes.queryParams.effectiveStartDate as DateTime,
           vendorCode: attributes.queryParams.vendorCode
   }]]></ee:set-payload>
               </ee:message>
           </ee:transform>
                   <successfactors:get-entity-by-id entitySetName="VendorInfo" doc:name="Get entity by id"
                config-ref="SuccessFactors_Configuration" />
           <ee:transform doc:name="Transform Message">
               <ee:message >
                   <ee:set-payload ><![CDATA[%dw 2.0
   output application/json
   ---
   payload]]></ee:set-payload>
               </ee:message>
           </ee:transform>
           <logger level="INFO" doc:name="Logger" message="#[payload]"/>
       </flow>

       <flow name="Delete-Entry">
           <http:listener doc:name="Listener" config-ref="HTTP_Listener_config" path="/deleteVendor"/>
           <ee:transform doc:name="Transform Message">
               <ee:message >
                   <ee:set-payload ><![CDATA[%dw 2.0
   output application/java
   ---
   {
       effectiveStartDate: attributes.queryParams.effectiveStartDate as DateTime,
       vendorCode: attributes.queryParams.vendorCode as String
   }]]></ee:set-payload>
               </ee:message>
           </ee:transform>
           <successfactors:delete-entity entitySetName="VendorInfo" doc:name="Delete entity"
           config-ref="SuccessFactors_Configuration" />
           <ee:transform doc:name="Transform Message">
               <ee:message >
                   <ee:set-payload ><![CDATA[%dw 2.0
   output application/json
   ---
   payload]]></ee:set-payload>
               </ee:message>
           </ee:transform>
           <logger level="INFO" doc:name="Logger" message="#[payload]"/>
       </flow>
</mule>

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.

+