Compound Action Examples
These examples show how data moves between slots and actions.
Get Salesforce Accounts by Name (Single Action, Return)
This compound action performs a single action called get_account_info which calls the Salesforce SOQL API to fetch accounts passing in account_nameas the slot to be used as the query.
Compound Action
Create Salesforce Case & Sync to JIRA
This compound action implements a cross-platform case management workflow that creates linked tickets in both Salesforce and JIRA:
- Creates a Salesforce case with:
- Description
- subject
- account ID
- Case type from input data
- Creates a corresponding JIRA issue with:
- Same description and subject as the Salesforce case
- Captures the JIRA issue key from the generated case for linking
- Links the two systems by:
- Updating the original Salesforce case with a comment/field containing the JIRA URL
- Constructs the full JIRA URL using the Moveworks DSL $CONCAT function: https://company.atlassian.net/browse/[JIRA-KEY]]`
Compound Action
Onboard Users (Multi Action, Switch, Return)
Slots
usernamefirstNamelastNamecompanyNamegroupNamemanagerNamemanagerEmail
Compound Action
Lookup Google Calendar Events (Action, Script Action, Return)
This compound action takes in 2 slots start_date and end_date and performs a Google Calendar REST API call to retrieve events, and data cleaning:
- Fetches calendar events from Google Calendar API using the specified date range (timeMin to timeMax) from the input slots.
- Cleans and filters the event data using a Python script that:
- Takes the raw calendar events from gcal_output.items
Extracts only 3 specific fields from each event:
- htmlLink - URL to view the event in Google Calendar
- description - Event description text
- summary - Event title/summary
- Takes the raw calendar events from gcal_output.items
Extracts only 3 specific fields from each event:
- Removes all other event metadata (attendees, location, timestamps, etc.)
- Returns the simplified event list as an object called
final_events
Compound Action
Grant Copilot License & Remove after 7 days (Action, Action w/ Delay Config, Action, Return)
This compound action below implements a temporary Microsoft Copilot license assignment workflow with the following sequence:
- Assigns a Microsoft Copilot license to the user (using their email address from metadata)
- Sends an immediate notification to the user confirming the license assignment and warning that it will be automatically removed in 7 days
- Waits 7 days by leveraging a
delay_config, then automatically removes the Copilot license from the user’s account - Returns a final message to inform the user that their license has been removed and they can request access again if needed
This workflow is useful for temporary trial access or short-term license provisioning, ensuring licenses don’t remain assigned indefinitely and providing clear communication to users about the temporary nature of their access.