Skip to content

adamanz/zendesk-salesforce-integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zendesk Salesforce Integration

License: MIT Salesforce Zendesk

Create Zendesk support tickets directly from Salesforce Cases using Flow Builder - no code required.

A Salesforce-native integration that enables customer service teams to automatically create Zendesk tickets from Salesforce Cases. Built with Invocable Apex for seamless Flow Builder compatibility.

Install

Install in Production Install in Sandbox

Package Version: 0.1.0-1 Subscriber Package Version Id: 04tfo000001FaSPAA0

Features

  • Invocable Apex Action - Use in Flow Builder to create Zendesk tickets with no code
  • Custom Metadata Configuration - Store API credentials securely (no hardcoded values)
  • Priority Mapping - Automatically maps Salesforce Case priority to Zendesk
  • Error Handling - Returns success/failure status with detailed error messages
  • External ID Linking - Links Zendesk tickets back to Salesforce Cases

Use Cases

  • Escalate high-priority Cases to your support team in Zendesk
  • Sync customer issues across CRM and helpdesk platforms
  • Automate ticket creation when Cases meet specific criteria
  • Enable service agents to create Zendesk tickets with one click

What's Included

Component Type Description
ZendeskTicketService Apex Class Invocable action for Flow Builder
ZendeskTicketServiceTest Apex Test Class Test coverage for the service
Zendesk_Settings__mdt Custom Metadata Type Stores API credentials securely
Zendesk_API Remote Site Setting Enables callouts to Zendesk API

Setup Instructions

Step 1: Install the Package

Click one of the install buttons above, or use the Salesforce CLI:

sf package install --package 04tfo000001FaSPAA0 --target-org your-org-alias --wait 10

Step 2: Get Your Zendesk API Token

  1. Log in to your Zendesk Admin Center
  2. Navigate to Apps and integrations > APIs > Zendesk API
  3. Click Add API token
  4. Copy the generated token (you won't be able to see it again)

Step 3: Configure Remote Site Setting

  1. Go to Setup > Security > Remote Site Settings
  2. Find and edit Zendesk_API
  3. Replace your-subdomain with your actual Zendesk subdomain in the URL
    • Example: https://acme.zendesk.com
  4. Save the changes

Step 4: Configure Custom Metadata

  1. Go to Setup > Custom Metadata Types
  2. Click Manage Records next to Zendesk Settings
  3. Edit the Default record:
Field Description Example
Subdomain Your Zendesk subdomain acme (for acme.zendesk.com)
Email Zendesk agent email address support@acme.com
API Token Token from Step 2 abc123xyz789...
Is Active Enable the integration true
  1. Save the record

Usage in Flow Builder

Add the Action

  1. Open Flow Builder
  2. Add an Action element
  3. Search for "Create Zendesk Ticket"
  4. Configure the inputs:

Input Variables

Variable Required Description
Case ID Yes The Salesforce Case record ID
Subject No Ticket subject (defaults to "Case from Salesforce")
Description No Ticket body/comment
Priority No High, Medium, or Low
Requester Email No Email of the ticket requester
Requester Name No Name of the ticket requester

Output Variables

Variable Type Description
Success Boolean true if ticket was created
Zendesk Ticket ID String ID of the created Zendesk ticket
Error Message String Error details if creation failed

Example Flow

Record-Triggered Flow on Case
    ↓
When Case Status = "Escalated"
    ↓
Action: Create Zendesk Ticket
    - Case ID: {!$Record.Id}
    - Subject: {!$Record.Subject}
    - Description: {!$Record.Description}
    - Priority: {!$Record.Priority}
    - Requester Email: {!$Record.Contact.Email}
    - Requester Name: {!$Record.Contact.Name}
    ↓
Decision: Check Success
    ↓
If True → Update Case with Zendesk Ticket ID
If False → Create Task for Manual Review

Troubleshooting

Common Errors

Error Cause Solution
Zendesk integration is not configured or inactive Settings not configured or Is_Active is false Complete Step 4 and set Is Active to true
Zendesk API Error: 401 Invalid credentials Verify email and API token are correct
Zendesk API Error: 404 Wrong subdomain Check Remote Site Setting URL matches your Zendesk URL
System.CalloutException Remote Site not configured Complete Step 3

Testing the Integration

  1. Create a simple Screen Flow with the Create Zendesk Ticket action
  2. Use a test Case ID
  3. Run the Flow and check the output variables
  4. Verify the ticket appears in Zendesk

Security Considerations

  • API tokens are stored in Custom Metadata (protected, not exposed in code)
  • Uses Basic Authentication with token (Zendesk recommended approach)
  • All callouts use HTTPS
  • External ID links tickets back to Salesforce for auditing

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Issues and pull requests are welcome! Please open an issue first to discuss any changes.

About

Salesforce-Zendesk integration: Create Zendesk support tickets from Salesforce Cases using Flow Builder and Invocable Apex. No-code automation for customer service teams.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages