As worker information is added or removed in Workday, you may need to create cases in Salesforce to use as a service management tool to manage your employees. This template allows you to broadcast (one way sync) those changes to workers in Workday and create cases in Salesforce in real time.
The detection criteria, and fields to move are configurable. Additional systems can easily added to be notified of changes. Real time synchronization is achieved via rapid polling of Workday or can be extended to include outbound notifications. This template leverages watermarking functionality to ensure that only the most recent items are synchronized and batch to efficiently process many records at a time.
This template is subject to the conditions of the MuleSoft License Agreement. Review the terms of the license before downloading and using this template. You can use this template for free with the Mule Enterprise Edition, CloudHub, or as a trial in Anypoint Studio.
As a Workday admin I want to broadcast Workers to Salesforce Case instances.
This Anypoint template serves as a foundation for the process of broadcasting Worker from Workday instance to Salesforce, being able to specify filtering criteria and desired behavior when a case already exists in the destination system.
As implemented, this template leverages the Mule batch module. The batch job is divided Process and On Complete stages.
Firstly the template queries Workday for all the existing active workers that match the filter criteria. The criteria is based on manipulations within the given date range. The last step of the Process stage groups the cases and create them in Salesforce. Finally during the On Complete stage the template outputs statistics data into the console.
Salesforce Customization: It is necessary to add a custom field ExtId (Text 255) to a Salesforce Case object. For more information, see Salesforce - Create Custom Fields. Note: This template illustrates the synchronization use case between Salesforce and a Workday.
- Where can I check that the field configuration for my Salesforce instance is the right one? See: Salesforce: Checking Field Accessibility for a Particular Field.
- How can I modify the Field Access Settings? See: Salesforce: Modifying Field Access Settings.
As a Data Destination
There are no considerations with using Salesforce as a data destination.
As a Data Source
There are no considerations with using Workday as a data origin.
Simple steps to get this template running.
Running On Premises
In this section we help you run this template on your computer.
Where to Download Anypoint Studio and the Mule Runtime
If you are new to Mule, download this software:
Note: Anypoint Studio requires JDK 8.
Importing a Template into Studio
In Studio, click the Exchange X icon in the upper left of the taskbar, log in with your Anypoint Platform credentials, search for the template, and click Open.
Running on Studio
After you import your template into Anypoint Studio, follow these steps to run it:
- Locate the properties file
mule.dev.properties, in src/main/resources.
- Complete all the properties required per the examples in the "Properties to Configure" section.
- Right click the template project folder.
- Hover your mouse over
Mule Application (configure).
- Inside the dialog, select Environment and set the variable
mule.envto the value
Running on Mule Standalone
Update the properties in one of the property files, for example in mule.prod.properties, and run your app with a corresponding environment variable. In this example, use
Running on CloudHub
When creating your application in CloudHub, go to Runtime Manager > Manage Application > Properties to set the environment variables listed in "Properties to Configure" as well as the mule.env value.
Once your app is all set and started, there is no need to do anything else. Every time a custom object is created or modified, it automatically synchronizes to Workday.
Deploying a Template in CloudHub
In Studio, right click your project name in Package Explorer and select Anypoint Platform > Deploy on CloudHub.
Properties to Configure
To use this template, configure properties such as credentials, configurations, etc.) in the properties file or in CloudHub from Runtime Manager > Manage Application > Properties. The sections that follow list example values.
Properties to Configure
Workday Connector Configuration
Salesforce imposes limits on the number of API Calls that can be made. Therefore calculating this amount may be an important factor to consider. The template calls to the API can be calculated using the formula:
- 1 + X + X / 200 -- Where X is the number of users to synchronize on each run.
- Divide by 200 because by default, users are gathered in groups of 200 for each upsert API call in the commit step. Also consider that this calls are executed repeatedly every polling cycle.
For instance if 10 records are fetched from origin instance, then 12 API calls are made (1 + 10 + 1).
This brief guide provides a high level understanding of how this template is built and how you can change it according to your needs. As Mule applications are based on XML files, this page describes the XML files used with this template. More files are available such as test classes and Mule application files, but to keep it simple, we focus on these XML files:
This file provides the configuration for connectors and configuration properties. Only change this file to make core changes to the connector processing logic. Otherwise, all parameters that can be modified should instead be in a properties file, which is the recommended place to make changes.
The functional aspect of this template is implemented in this XML file, directed by a flow that polls for Workday creates or updates. The several message processors constitute four high level actions that fully implement the logic of this template:
- The template goes to Workday and queries all the existing workers that match the filter criteria.
- During the Process stage, each Workday Worker is filtered depending on if it has an existing matching case in the Salesforce organization. The logic ensures matching a worker with an account and a contact (and creating if it does not exist).
- The last step of the Process stage groups the cases and creates or updates them in the Salesforce organization.
- During the On Complete stage, the template logs output statistics data to the console.
This file contains the endpoints for triggering the template and for retrieving the objects that meet the defined criteria in a query. You can execute a batch job process with the query results.
This file handles how your integration reacts depending on the different exceptions. This file provides error handling that is referenced by the main flow in the business logic.