SAP Concur Connector | MuleSoft Documentation
# SAP Concur Connector
SAP Concur Connector v4.0
Anypoint Connector for SAP Concur (Concur Connector) is a SaaS provider from SAP for integrated travel and expense management solutions.
Concur Connector operates as a bidirectional gateway between instances of Concur and Mule runtime engine (Mule). Concur Connector is a closed-source connector that supports SOAP and REST calls to Concur APIs.
Release Notes: SAP Concur Connector Release Notes Exchange: SAP Concur Connector
## Before You Begin
To use this information, you should be familiar with SAP Concur, Mule, Anypoint Connectors, Anypoint Studio, Mule concepts, elements in a Mule flow, and Global Elements.
You need login credentials to test your connection to your target resource.
For software requirements and compatibility information, see the Connector Release Notes.
## POM File Information
```
<dependency>
 <groupId>org.mule.modules</groupId>
 <artifactId>mule-module-concur</artifactId>
 <version>x.y.z</version>
 <classifier>mule-plugin</classifier>
</dependency>
```

Replace `x.y.z` with the version that corresponds to the connector you are using.
To obtain the most up-to-date `pom.xml` file information, access the connector in Anypoint Exchange and click **Dependency Snippets**.
## About Concur API Availability
Review the SAP Concur Connector Reference for the supported API.
## Add the Connector to a Studio Project
Anypoint Studio provides two ways to add the connector to your Studio project: from the Exchange button in the Studio taskbar or from the Mule Palette view.
### Add the Connector Using Exchange
  1. In Studio, create a Mule project.
  2. Click the Exchange icon **(X)** in the upper-left of the Studio task bar.
  3. In Exchange, click **Login** and supply your Anypoint Platform username and password.
  4. In Exchange, search for "concur".
  5. Select the connector and click **Add to project**.
  6. Follow the prompts to install the connector.


### Add the Connector in Studio
  1. In Studio, create a Mule project.
  2. In the Mule Palette view, click **(X) Search in Exchange**.
  3. In **Add Modules to Project** , type "concur" in the search field.
  4. Click this connector’s name in **Available modules**.
  5. Click **Add**.
  6. Click **Finish**.


## Example Use Case
This guide presents two of many use cases you might have for the Concur connector in your organization: getting a list of lists and retrieving quickexpenses. You may jump ahead and paste the code for the flows into the XML Editor in Studio after you download the Concur connector and create a global element to reference your Concur instance credentials.
### Retrieve a List of Lists
After creating a new project and a Concur global element:
  1. Add a new flow element by dragging it from the palette and give a name to the flow, such as `getlists`.
  2. Drag an HTTP Listener into your flow from the palette.
  3. Double-click the HTTP Listener and click the green plus sign next to the Connector Configuration dropdown and set the Host to localhost, and the Port to 8081.
  4. Click OK to close the properties window, then enter getlists as the value in the Path field in this HTTP listener’s Basic Settings section.
  5. Add a Concur connector to the new flow and select the Get list of lists operation, after selecting the Connector Configuration you desire.
  6. Finally, add a Transform Message transformer to the flow.
  7. For reference you may check the particular getlists flow within the example XML code further down.


To execute the flow and check the outcome:
  1. Right-click the project in the Package Explorer, and click Run As > Mule Application.
  2. Check that the application has started by monitoring the Studio console.
  3. Open browser and go to `http://localhost:8081/getlist`
  4. You should receive a JSON response like this:
```
{"list":[{"batchLink":"https://www.concursolutions.com/api/expense/list/v1.0/gWqXO46r6GsRt9CeqUjOAfZXRTmGyyVczqg/batch","id":"https://www.concursolutions.com/api/expense/list/v1.0/gWqXO46r6GsRt9CeqUjOAfZXRTmGyyVczqg","isVendor":false,"itemsLink":"https://www.concursolutions.com/api/expense/list/v1.0/gWqXO46r6GsRt9CeqUjOAfZXRTmGyyVczqg/items","levels":1,"name":"AT Tax Form List 1"},
{"batchLink":"https://www.concursolutions.com/api/expense/list/v1.0/gWqXO46r6GsRsUIXmIbg3iUc6qE9AlKEVxA/batch","id":"https://www.concursolutions.com/api/expense/list/v1.0/gWqXO46r6GsRsUIXmIbg3iUc6qE9AlKEVxA","isVendor":false,"itemsLink":"https://www.concursolutions.com/api/expense/list/v1.0/gWqXO46r6GsRsUIXmIbg3iUc6qE9AlKEVxA/items","levels":1,"name":"BE Tax Form List 1"},
{"batchLink":"https://www.concursolutions.com/api/expense/list/v1.0/gWqXO46r6GscWDPncbQqGUoCjCv4pxrnp2A/batch","id":"https://www.concursolutions.com/api/expense/list/v1.0/gWqXO46r6GscWDPncbQqGUoCjCv4pxrnp2A","isVendor":false,"itemsLink":"https://www.concursolutions.com/api/expense/list/v1.0/gWqXO46r6GscWDPncbQqGUoCjCv4pxrnp2A/items","levels":1,"name":"CH Tax Form List 1"}
```

  5. Click the stop button to halt the server running the application.


### Create a Quick Expense
  1. Add a new flow element by dragging it from the palette and name it getquickexpenses.
  2. Add an HTTP Listener to your flow by dragging it from the palette.
  3. Use the configuration from the first demo, or if you did not create that flow, click the green plus sign next to Connector Configuration for the HTTP endpoint and enter localhost as the Host and 8081 for the Port.
  4. Click OK to close the properties window, then enter getquickexpenses as the value in the Path field in this HTTP listener’s Basic Settings section.
  5. Add the Concur connector to the new flow, referencing a global element from the Connector Configuration and set an Operation to perform and any other properties you require.
  6. Finally, add an Transform Message transformer link in the previous example.


To execute the flow and check the outcome, perform the following steps:
  1. Right-click the project in the Package Explorer > Run As > Mule Application
  2. Check the console to see when the application starts.
  3. Open the browser and go to `http://localhost:8081/getquickexpenses`
  4. You should receive a JSON response like this:
```
{"items":{"quickExpense":[{"comment":"","currencyCode":"USD","expenseTypeCode":"UNDEF","expenseTypeName":"Undefined","id":"gWr7TiTHdIi5fyWCPBRPtqjeCIWyv2w","locationName":"","ownerLoginID":"","ownerName":"Unknown","paymentTypeCode":"PENDC","receiptImageID":"","transactionAmount":111.0,"transactionDate":"2018-07-21T00:00:00","uri":"https://www.concursolutions.com/api/v3.0/expense/quickexpenses/gWr7TiTHdIi5fyWCPBRPtqjeCIWyv2w","vendorDescription":""},
{"comment":"","currencyCode":"USD","expenseTypeCode":"UNDEF","expenseTypeName":"Undefined","id":"gWr7TiTXbQ47PtJ$pVkr6CzbLeRVRPww","locationName":"","ownerLoginID":"","ownerName":"Unknown","paymentTypeCode":"PENDC","receiptImageID":"","transactionAmount":111.0,"transactionDate":"2018-07-21T00:00:00","uri":"https://www.concursolutions.com/api/v3.0/expense/quickexpenses/gWr7TiTXbQ47PtJ$pVkr6CzbLeRVRPww","vendorDescription":""},
```

  5. Click the stop button to halt the server running the application.


## See Also
  * Expense Report Resource page
  * MuleSoft Help Center