This assignment focuses on implementing integration between Salesforce and Jira, creating a foundation for bidirectional synchronization using Salesforce custom objects and the Jira API.
By the end of this lesson, you will be able to:
- Implement outbound callouts from Salesforce to Jira using Queueable Apex
- Create custom wrapper classes to handle Jira API payloads
- Configure proper authentication for Jira API integration
- Implement robust error handling for external system integration
- Follow separation of concerns pattern in integration development
In this assignment, you will be implementing the foundation for a Jira integration with Salesforce. The application will create Jira projects and issues from corresponding Salesforce custom objects, using asynchronous processing techniques.
Your implementation must:
- Make callouts to Jira when Jira Project and Jira Issue records are created in Salesforce
- Use Queueable Apex for asynchronous processing of callouts
- Create proper wrapper classes to handle Jira API payloads
- Update Salesforce records with the corresponding Jira IDs after successful creation
- A Jira Cloud account (sign up at https://www.atlassian.com/software/jira/free)
- Jira API Key for authentication
- Properly configured Named Credential in your org (see Setup Instructions)
Your tasks for this assignment include:
- Implement
JiraAPIServiceclass for making callouts to Jira API - Complete the
JiraWrapperclass methods for handling Jira payloads - Complete the
JiraTriggerHelperclass to handle trigger operations - Implement the
JiraCalloutQueueableclass to make asynchronous callouts - Make sure the triggers correctly handle insert scenarios for both projects and issues
- Log in to your Jira Cloud account
- Click on your profile icon in the top-right corner
- Select Account Settings from the dropdown menu
- Navigate to the Security tab
- Scroll down to the API token section
- Click on Create and manage API tokens
- Click Create API token
- Give your token a meaningful name (e.g., "Salesforce Integration")
- Copy and securely store the generated API token - you won't be able to see it again!
- Use this token along with your email address for Basic Authentication in the Named Credential
To obtain your Jira Account ID (needed for the Project Lead):
- Log in to your Jira Cloud account
- Click on your profile icon in the sidebar
- Select Profile from the menu
- Look at the URL in your browser - your Account ID is the alphanumeric string after the last slash
Example:
https://your-domain.atlassian.net/people/5bb7ad0ccc53fd0760103780Account ID:5bb7ad0ccc53fd0760103780 - Update the
LEAD_ACCOUNT_IDconstant in theJiraWrapperclass with your Account ID
Your implementation should:
- Successfully create Projects in Jira when Jira_Project__c records are created in Salesforce
- Successfully create Issues in Jira when Jira_Issue__c records are created in Salesforce
- Update the Salesforce records with the corresponding Jira IDs/keys
- Handle errors gracefully with proper error messaging
Your implementation should:
- Make successful callouts to the Jira API
- Create Projects and Issues in Jira
- Update Salesforce records with Jira IDs/keys
- Follow Salesforce best practices for integration
- Include comprehensive error handling
- Review the Jira API documentation
- Use the Developer Console debug logs to troubleshoot
- Test with mock responses before making actual API calls
- Pay attention to the JSON payload structure required by Jira
- Apex Developer Guide: Queueable Apex
- Apex Developer Guide: Callouts from Triggers
- JSON Serialization in Apex
- Named Credentials in Salesforce
- Jira API Documentation
Once you've completed the basic implementation, try these challenges:
- Add support for updating existing Jira Projects and Issues
- Implement error retry mechanism for failed callouts
- Create a Lightning component to display Jira Projects and Issues
- Add support for custom fields in Jira Issues
If you need help:
- Review the Jira API documentation
- Check the provided code structure for guidance
- Reach out to your instructor
Happy coding! 🚀
This is part of the Cloud Code Academy Integration Developer certification program.
© 2025 Cloud Code. All rights reserved.
This software is provided under the Cloud Code Developer Kickstart Program License (CCDKPL) Version 1.0. The software is licensed, not sold, and is intended for personal educational purposes only as part of the Cloud Code Developer Kickstart Program.
See the full license terms in LICENSE.md for more details regarding usage restrictions, ownership, warranties, and limitations of liability.