Salesforce to Workday Financials Account - Prospect Broadcast

(0 reviews)

home

Broadcasts new accounts or updates to existing accounts from Salesforce to Workday Financials as Prospects in real time. This template ensures that customer account information in Workday Financials module stays updated to the changes in Salesforce. The detection criteria and fields to integrate are configurable. Additional systems can be added to be notified of the changes. Real time synchronization is achieved either via rapid polling of Salesforce or Outbound Notifications to reduce the number of API calls.

This template uses watermarking to ensure that only the most recent items are synchronized and batch to efficiently process many records at a time.

4d81d27e-44e2-4b3e-8b13-b7ee6231c05d-image.png

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 Salesforce admin I want to synchronize accounts and prospects between Salesforce and Workday.

This template helps you synchronize accounts from a Salesforce instance to prospects in a Workday instance. Each time there is a new account or a change in an already existing one with type=Prospect, the integration polls for changes in the Salesforce source instance and updates the prospect in the target Workday instance.

This template provides examples and can be a starting point to adapt your integration to your requirements.

As implemented, this template leverage the Mule batch module The batch job is divided in Process and On Complete stages.

  • The integration starts by a poll defined in the flow that triggers the application, queries for the newest Salesforce updates or creates that match a filter criteria, and executes the batch job.
  • During the Process stage, each Salesforce account is checked to see if it has an existing matching prospect in the Workday instance.
  • The last step of the Process stage groups the accounts and inserts or updates them in Workday.
  • Finally during the On Complete stage the template logs output statistics data to the console.

Considerations

To make this template run, there are certain preconditions that must be considered. All of them deal with the preparations in both source (Salesforce) and destination (Workday) systems, that must be made for the template to run smoothly. Failing to do so can lead to unexpected behavior of the template.

This template requires a Workday instance to work.

Salesforce Considerations

As a Data Source

If a user who configures the template for the source system does not have at least read only permissions for the fields that are fetched, then an InvalidFieldFault API fault displays.

java.lang.RuntimeException: [InvalidFieldFault [ApiQueryFault 
[ApiFault  exceptionCode='INVALID_FIELD'
exceptionMessage='Account.Phone, Account.Rating, Account.RecordTypeId, 
Account.ShippingCity
^
ERROR at Row:1:Column:486
No such column 'RecordTypeId' on entity 'Account'. If you are 
attempting to use a custom field, be sure to append the '__c' 
after the custom field name. Reference your WSDL or the describe 
call for the appropriate names.'
]
row='1'
column='486'
]
]

Workday Considerations

As a Data Destination

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

Workday Financials Considerations

As a Data Destination

There are no considerations with using Workday Financials as a data destination.

Run it!

Simple steps to get this template running.

See below.

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 mule.dev.properties, 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 mule.prod.properties, 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.

While creating your application on CloudHub (or you can do it later as a next step), you need to go to Deployment > Advanced to set all environment variables detailed in "Properties to Configure" as well as setting the mule.env value.
After your application is set up and started, there is no need to do anything else. Each time an account is created or modified, it is automatically synchronized to your Workday instance.

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

Application Configuration

  • page.size 200

  • scheduler.frequency= 60000

  • scheduler.start.delay= 500
  • watermark.default.expression (now() - |PT5M|) as String or 2018-01-02T15:53:00Z

Salesforce Connector Configuration

  • sfdc.username joan.baez@orgb
  • sfdc.password JoanBaez456
  • sfdc.securityToken ces56arl7apQs56XTddf34X
  • sfdc.url https://login.salesforce.com/services/Soap/u/32.0

Workday Connector Configuration

  • wdayf.user wdayf_user
  • wdayf.password wdayf_password
  • wdayf.endpoint https://{your Workday domain}/ccx/service/{your tenant name}/Revenue_Management/v23.2

  • wdayf.country USA

  • wdayf.state USA-CA
  • wdayf.postalCode 90001
  • wdayf.city San Francisco
  • wdayf.street Main Street 123
  • wdayf.phone 123-4567

API Calls

Salesforce imposes limits on the number of API calls that can be made. However, we make API call to Salesforce only once during migration, so this is not something to worry about.

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

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


businessLogic.xml

The functional aspect of this template is implemented in this XML file, directed by a flow that polls for Salesforce 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 Salesforce and queries all existing accounts that match the filter criteria.
  2. During the Process stage, each Salesforce Account ID is checked in an external ID field in Workday (Prospect_Reference_ID), if it has an existing matching object in Workday.
  3. The template upserts the relevant prospect fields in Workday.
  4. Finally during the On Complete stage, the template logs output statistics data to the console.

endpoints.xml

This file contains a flow with a poll that periodically queries Salesforce for account updates or creates that meet the defined criteria in the query and then executes the batch job process with the query results.


errorHandling.xml

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.





Reviews

TypeTemplate
OrganizationMuleSoft
Published by
MuleSoft Organization
Published onJul 16, 2019
Asset overview

Asset versions for 2.1.x

Asset versions
VersionActions
2.1.1
2.1.0

Categories

Object
AccountNo values left to add
Pattern
BroadcastNo values left to add
Products
SalesforceWorkdayNo values left to add
Functions
Enterprise ITFinanceSalesNo values left to add