Workday to Salesforce Worker Case Broadcast

(0 reviews)


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.


License Agreement

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.

Use Case

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.

Salesforce Considerations

As a Data Destination

There are no considerations with using Salesforce as a data destination.

Workday Considerations

As a Data Source

There are no considerations with using Workday as a data origin.

Run it!

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:

  1. Locate the properties file, in src/main/resources.
  2. Complete all the properties required per the examples in the "Properties to Configure" section.
  3. Right click the template project folder.
  4. Hover your mouse over Run as.
  5. Click Mule Application (configure).
  6. Inside the dialog, select Environment and set the variable mule.env to the value dev.
  7. Click Run.

Running on Mule Standalone

Update the properties in one of the property files, for example in, and run your app with a corresponding environment variable. In this example, use mule.env=prod.

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.

Application Configuration

Properties to Configure
  • scheduler.frequency 10000
  • scheduler.start.delay 500
  • watermark.default.expression 2017-12-13T03:00:59Z
Workday Connector Configuration
  • wday.username joan
  • wday.tenant acme_pt1
  • wday.password joanPass123
Salesforce Connector
  • sfdc.username
  • sfdc.password secret
  • sfdc.securityToken 1234fdkfdkso20kw2sd

  • sfdc.description "Welcome Package"

API Calls

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).

Customize It!

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:

  • config.xml
  • businessLogic.xml
  • endpoints.xml
  • errorHandling.xml


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:

  1. The template goes to Workday and queries all the existing workers that match the filter criteria.
  2. 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).
  3. The last step of the Process stage groups the cases and creates or updates them in the Salesforce organization.
  4. 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.


Published by
MuleSoft Organization
Published onNov 14, 2018
Asset overview

Asset versions for 2.1.x

Asset versions


WorkerEmployeeNo values left to add
BroadcastNo values left to add
WorkdaySalesforceNo values left to add
Enterprise ITNo values left to add