Concur Expense Sync
Setup
Prerequisites
- MuleSoft Direct setup is required. For more information, see the MuleSoft Direct setup guide.
- Obtain SAP Concur license and Concur client app credentials for establishing a connection to Concur via APIs. The Concur client app should have all required access such as read/write access to expenses, expense reports, attendees, users etc.
- Create an Integration User and ensure this user has read and write access to all mapped Expense entities and fields in Life Sciences Cloud.
- Create a custom permission set that uses the
Life Sciences Commercial licenseand grants access to all required entities and fields. - Create a second custom permission set that uses the
Salesforce API Integration license. - Assign both custom permission sets and the
Life Sciences Medical permission setto the Integration User.
- Create a custom permission set that uses the
- To integrate the application with Life Sciences Cloud, set up a Local External Client App in your Salesforce org. When you configure the external client app, select
Run asas the Integration User created in previous step. You’ll need the credentials from this external app during the MuleSoft Direct setup. - Ensure that the ExpenseReport.ExpenseSystemIntegrationStatus and Expense.ExpenseSystemIntegrationStatus picklist values has these values added:
- Pending
- Completed
- Error
- Failure
- Deleted
- Ensure that the ExpenseReport.Status picklist values has these values added:
- NotSubmitted
- Submitted
- InReview
- Approved
- Rejected
- Deleted
- Enable Field-Level Security (FLS) for the integration user profile on all mapped fields. If you use the default field mappings, ensure FLS is enabled for the following fields:
- ExpenseReport
- Status
- ExpenseSystemIntegrationStatus
- ExpenseSystemIntegrationError
- SourceSystemName
- SourceSystemIdentifier
- Expense
- RelatedExpenseType
- SourceSystemName
- SourceSystemIdentifier
- Comments
- ExpenseSystemIntegrationStatus
- ExpenseSystem IntegrationError
- HealthcareProvider
- ExpenseSystemIdentifier
- ExpenseReport
Setup
- Log into Salesforce and navigate to the Setup page.
- Search for the
MuleSoft Directpage. - Select the
Concur Expense Syncapplication and clickEnable. - Enter the application display name, target business group, and environment for deployment, then click
Next. - Select the
Concur Expense Synctab and enter ‌these details to configure the application properties:
| Key name | Sample value | Description |
|---|---|---|
| Salesforce Host | test-instance.salesforce.com | Salesforce Life Sciences instance URL |
| Salesforce Consumer Key | - | Connected app Client ID to authenticate to Salesforce |
| Salesforce Consumer Secret | - | Connected app Client Secret to authenticate to Salesforce |
| Concur Host | us2.api.concursolutions.com | Concur API instance URL |
| Concur Consumer Key | - | Client Id to authenticate to Concur API |
| Concur Consumer Secret | - | Client Secret to authenticate to Concur API |
| Concur Refresh Token | - | A Onetime Refresh Token to get Access Token to authenticate to Concur API |
- To add any optional configuration, click
Add Additional Parametersand enter the required details. - Click
Proceedto deploy the application.
Post Deployment
- To enable/disable/modify the sync jobs (salesforce-to-concur-sync, concur-to-salesforce-sync) after deployment, follow below steps:
- Log in to Mulesoft Anypoint Platform.
- From the top right corner, select the Organization where the applications are deployed.
- In the Management Center, select Runtime Manager and choose the correct environment where the applications are deployed.
- Search for and select the Concur expense sync application which was deployed using MS Direct.
- Navigate to Schedules, select the jobs, and enable or disable or modify the schedule as required.
Customizations
Customizations can be done in the app by modifying the below mappings (in /resources/dwl/mapping folder):
fieldMapping.dwl
Contains functions for field value mappings between Salesforce and Concur.
| Function Name | Description |
|---|---|
| getExpenseType | Returns the ExpenseType field mapping between Salesforce and Concur. Key = Salesforce ExpenseType value, Value = Concur ExpenseType value. |
| getExpenseReportStatus | Returns the Expense Report Status field mapping between Salesforce and Concur. Key = Salesforce Status value, Value = Concur ApprovalStatusName value. |
Source:
./src/main/resources/dwl/mapping/fieldMapping.dwl
toConcur.dwl
Contains functions for transforming Salesforce data to Concur format (used in salesforce to concur job).
| Function Name | Description |
|---|---|
| getAttendee | Maps Salesforce participant data to Concur Attendee object. |
| getExpenseReport | Maps Salesforce ExpenseReport data to Concur expense report format. |
| getExpense | Maps Salesforce Expense data to Concur expense format. |
| getAttendeeAssociation | Maps Salesforce data to Concur attendee association format. |
Source:
./src/main/resources/dwl/mapping/toConcur.dwl
toSalesforce.dwl
Contains functions for transforming Concur data to Salesforce format (used in concur to salesforce job).
| Function Name | Description |
|---|---|
| getExpenseReport | Maps Concur expense report data to Salesforce ExpenseReport object. |
| getExpenseReportEntry | Maps Concur data to Salesforce ExpenseReportEntry object. |
| getExpense | Maps Concur expense data to Salesforce Expense object. |
Source:
./src/main/resources/dwl/mapping/toSalesforce.dwl
Contraints/Limitations
- All users submitting expenses in Life Sciences Cloud must have a corresponding profile in Concur.
- Expense reports must be manually submitted to the approval workflow in Concur. The integration does not automatically submit records to the workflow.
- The Salesforce to Concur job must be executed before the Concur to Salesforce job.
- When race conditions occur between records in Salesforce and Concur, the record with the most recent timestamp takes precedence.
- Only one attachment is supported per expense.
- The maximum supported attachment size is 1000KB and supported attachment types are PNG, JPG, JPEG, and PDF.
- If an error or failure occurs while syncing expenses or reports, manual intervention is required to change the status to Pending so that the Salesforce to Concur job can process the record again.
- The following entities are not synced from Concur to Salesforce:
- New reports and expenses created directly in Concur
- Receipts
- Participants/Attendees
- The integration does not support creating new users in Concur or deleting/inactivating attendees and users in Concur.
- Edits made directly in Salesforce web application for expense reports, expenses, participants, and attachments are not synced to Concur. Expenses must be edited in the mobile application or directly in Concur.
- Attendee duplicate detection logic must be managed in Concur.
- A default Expense Payment Type must be configured in Concur's policy management settings.
- Expense comments added or updated in Concur are not synced to Salesforce due to limitation of Concur APIs.
- If Concur auto-allocates the total amount, company settings might have mandated equal allocation for specific expense types.