Authenticating with Workday integration
To get started, first you need to enable the Workday integration in your account and also setup some basic processes.1
Enable the Workday App
Step 1: Enable the Workday App
After setting up your account, the next step is to enable the Workday app in your Cobalt account.Apps cannot be enabled using the API. You will need to enable the app through the UI.
Apps
in Cobalt and search for Workday and enable the app by clicking on the Go Live
button in the top right corner.
Follow the steps given here to get your API credentials required for authentication.
2
Create a Linked Account
Step 2: Create a Linked Account
A Linked Account in Cobalt represents the end-users or customers who will use the integration through the platform. Each Linked Account requires a unique linked_account_id, which typically corresponds to an ID from your internal data model (e.g., a user or account ID).Learn more about Linked Accounts here.
Param | Required | Type | Description |
---|---|---|---|
linked_account_id | Mandatory | String | Unique customer identifier |
name | Optional | String | Name of the customer |
3
Generate Session Token for your Linked Account
Step 3: Generate Token
After creating a Linked Account, the next step is to generate a session token. Session tokens help protect your Cobalt API key and manage end-customer tokens more securely.To create a session token, use the following API call:4
Open Hosted Portal Auth Flow
Step 4: Open Hosted Portal Auth Flow
Next, you will need to generate a Hosted URL that your users will use to authenticate with Salesforce. Cobalt securely stores the credentials and handles API calls on behalf of your users.Use the following API call to generate the Hosted URL: Hosted Portal is a no-code solution provided by Cobalt that removes the need to build your own UI for handling integration authentication and configuration.
5
Authenticate Using Hosted Portal
Step 5: Perform Key based Authentication
Visit the Hosted URL provided in the API response. The Hosted Portal will display all the integrations you have enabled, including NetSuite.To authenticate:- Navigate to the Workday integration in the portal.
- Provide the requested credentials.
- Click on Connect to begin successfully authenticate with Workday.
You have successfully authenticated with Workday integration.The next step is to create workflows for your use-case.
Creating Workflows in Workday
There are 2 major categories of workflows that you can create in Workday currently.Data Import from Workday
Sync data from Workday to your system.
Push Data to Workday
Create data on Workday from your system.
Data Import from Workday
Consider a use-case where you want to sync all the employees present in Workday to your system. In the Workday integration, go toWorkflows
and create a new workflow by clicking on +Add Workflow
button and name it as Sync Employees
.
Data Import from Workday
Data Import from Workday
Follow the steps given to build the workflow:
1
Add Trigger in Start Node
All workflows start with a trigger, which determines when the workflow will run and how data is passed into the workflow.
For this workflow we will use the Event Based trigger.Click on the
Give a name to your event and keep the payload as an empty object.
Learn more about the triggers and its types here.
Start Node
, select your native app option and click on + Create New Event
.
2
Add Workday Node
Now to fetch all the employees present in your user’s account, we need to call Workday API.Click on
Nodes
option in the top right and drag the Workday Node from Native Apps section to the workflow builder. Connect this node with Start Node.3
Fetch Employees from Workday using Action
Click on the Workday Node and select 
Get Workers
action.
You can do additional filters in the Get Workers action such as exclude inactive workers and more.
4
Mapping Employee fields
Click on
You can now do mapping using JavaScript code. Try the sample code provided below:
+ Map Fields
under Input Parameters, add key name as employees
and in value we will provide the response received through Workday node which will be restructured.In Value
, select Nodes tab under Insert Variable and click on +
of the Workday Node.
5
API Proxy in Workflow
You have successfully fetched all contacts and structured the payload. Now to receive it in your server, you need to configure an API Proxy.In Cobalt Dashboard, navigate to 
Developer
> API Proxies
and click on New Action
. Configure an API endpoint, where you want to receive the response.If you want to test, go to webhook.site and copy Your unique URL
and configure this as a POST Request and Save
.
Learn more about API Proxies here.
6
Use API Proxy in Workflow
From Native Apps nodes, add your org’s Node and connect it with Custom Code.Click on the node and select the API Proxy that you created from the Actions. Add the response from Custom Code node in data field and click on 
Save
.Ensure that you add a field in the API Proxy where you can pass the JSON data and then added it to the API Call body as well in the POST request.

Hurray!!You have successfully created a Workday workflow to sync all the employees to your system.
Push Data to Workday
Consider a use-case where you want to create an employee present in your system to Workday. This workflow will be fired when you send an Event with the payload of the contact to be added. In the Workday integration, go toWorkflows
and create a new workflow by clicking on +Add Workflow
button and name it as Create New Employee
.
Push Data to Workday
Push Data to Workday
Follow the steps given to build the workflow:
1
Add Trigger in Start Node
All workflows start with a trigger, which determines when the workflow will run and how data is passed into the workflow.
For this workflow we will use the Event Based trigger.Click on the
Give a name to your event and provide all the data related to the contact in the payload.
Learn more about the triggers and its types here.
Start Node
, select your native app option and click on + Create New Event
.
2
Add Workday Node
Now to create a new contact in Workday, we need to call Workday API.Click on
Nodes
option in the top right and drag the Workday Node from Native Apps section to the workflow builder. Connect this node with Start Node.3
Add Action in node
Click on Workday Node and add the 
Create Employee
action.
To provide the data in all the fields from your Event payload, just click on a field and from the Event tab under Insert Variable, select the fields from the body that you sent as payload.
Ensure that all the mandatory fields in the action are filled, else the Workday API will give error.
Hurray!!You have successfully created a Workday workflow to create a new employee.
You have successfully created the workflows for your use case.Next step is to enable and execute those workflows for your Linked Accounts.
Executing the Workflows
To run these workflows for your users or Linked Accounts, you need to do the following steps:1
Create Config for Linked Account
Config is a customization that you store for each integration of your end-customers.It will return information about config of the application for the Linked Account and provides you with all the published workflows and settings input for the user required to execute the workflow.
Create Config
You can create config for the Linked Account through the Cobalt Connect SDKs or using the APIs.You can use the .config() method or the Create Config API which returns the specified config or creates one if it doesn’t exist for the Linked Account.Make a request with theApplication Slug
and linked_account_id
as mandatory fields for it. You can request in the following way:Response
2
Enable Workflow
Now you need to enable the workflow for your Linked account. You can either ask the user to enable them or you can do so for them by using the Update Config API or .updateconfig() method.Make the following request:In response, you get the updated config information for the application.
3
Third Step
Once the required workflows are enabled, you need to fire event to start execution. You can use the Trigger Event for app API with the following request:
cURL
Congratulations!!You have successfully created a Workday integration and executed it for your users.