Zendesk Integration
Relevant source files
The following files were used as context for generating this wiki page:
- salesforce-package/force-app/main/default/flows/Case_Creation.flow-meta.xml
- salesforce-package/force-app/main/default/classes/ZendeskTicketService.cls-meta.xml
- salesforce-package/force-app/main/default/objects/Zendesk_Settings__mdt/Zendesk_Settings__mdt.object-meta.xml
- convex/ai.ts
- salesforce-package/force-app/main/default/lwc/talkCrmSetup/talkCrmSetup.html
The Zendesk integration automates the creation of Zendesk tickets directly from Salesforce Case records. This system is designed to streamline support workflows by ensuring that when a support case is logged in Salesforce, a corresponding ticket is generated in Zendesk. The process is orchestrated by a Salesforce Flow that is triggered upon the creation of a Case record.
The integration can be initiated through various channels, including the AI-powered voice assistant, which can interpret natural language to create a Salesforce Case. Once the Case is created, the automation handles the communication with Zendesk and updates the original Case record with the resulting Zendesk ticket ID.
Architecture and Data Flow
The integration follows a clear, event-driven path starting from the creation of a Salesforce Case.
The diagram below illustrates the end-to-end process from a user request to the final ticket creation in Zendesk.
Components
AI-Driven Case Creation
Users can initiate the creation of a Salesforce Case by interacting with the TalkCRM AI assistant. The AI is configured to understand natural language requests related to creating support cases.
The AI's prompt includes context about the Case object and its fields, enabling it to parse user requests and formulate the necessary data to create a Case record.
Example AI Prompt Instruction:
"Create a case for Acme - their website is down" → { "action": "create", "objectType": "Case", "fields": { "Subject": "Website is down", "Description": "Customer reported website is down", "Status": "New", "Priority": "High", "Origin": "Phone" }, "searchTerm": "Acme", "response": "Creating a high priority case for Acme about the website issue.", "followUp": "Need to assign it to someone?" }
Sources: convex/ai.ts:630-632
The AI identifies the Case object and extracts key fields such as Subject, Description, Status, Priority, and Origin. This action creates a new Case record in Salesforce, which is the entry point for the Zendesk automation.
Sources: convex/ai.ts:25-26, 625-632
Salesforce Flow: Case_Creation
This is an auto-launched, record-triggered flow that executes after a Case record is saved. It contains a scheduled path named Create_ZenDesk_Case that runs one minute after the case is created.
Sources: salesforce-package/force-app/main/default/flows/Case_Creation.flow-meta.xml:135-143
The flow performs the following steps:
- Get Contact For Zendesk: It retrieves the associated
Contactrecord based on theAccountIdof the newly createdCase. This is used to get the requester's name and email. - Create Zendesk Ticket Action: It calls the
ZendeskTicketServiceApex class, passing the necessary case and contact details. - Update With Ticket Number: It takes the
zendeskTicketIdreturned from the Apex action and updates theCommentsfield on the originalCaserecord.
The following diagram shows the logic of the Create_ZenDesk_Case scheduled path.
Apex Service: ZendeskTicketService
This Apex class, exposed as an Invocable Action, serves as the bridge to the Zendesk API. The Case_Creation flow calls this service to perform the actual ticket creation.
Sources: salesforce-package/force-app/main/default/classes/ZendeskTicketService.cls-meta.xml, salesforce-package/force-app/main/default/flows/Case_Creation.flow-meta.xml:5-39
The service accepts the following parameters from the flow:
| Parameter | Type | Description | Source |
|---|---|---|---|
caseId | String | The ID of the Salesforce Case record. | [$Record.Id] |
description | String | The Description from the Case. | [$Record.Description] |
priority | String | The Priority from the Case. | [$Record.Priority] |
requesterEmail | String | The Email of the related Contact. | [Get_Contact_Zen.Email] |
requesterName | String | The Name of the related Contact. | [Get_Contact_Zen.Name] |
subject | String | The Subject from the Case. | [$Record.Subject] |
Table data sourced from: salesforce-package/force-app/main/default/flows/Case_Creation.flow-meta.xml:11-38
Upon successful ticket creation in Zendesk, the action returns the zendeskTicketId, which is then stored back in Salesforce.
Sources: salesforce-package/force-app/main/default/flows/Case_Creation.flow-meta.xml:123-128
Configuration: Zendesk_Settings__mdt
The integration relies on a Custom Metadata Type named Zendesk_Settings__mdt for configuration. This object is designed to hold settings required for the ZendeskTicketService to authenticate and communicate with the Zendesk API, such as API keys or endpoint URLs. The use of a Custom Metadata Type allows administrators to manage these settings without changing code.
Related Integrations
The setup process and automation flows suggest a broader strategy of integrating external services.
Slack Integration
The TalkCRM setup page includes an option to "Connect Slack," which allows users to get call summaries and use /crm commands within Slack. While not directly part of the Zendesk flow, this indicates a pattern of pushing notifications and enabling actions in third-party communication tools.
Sources: salesforce-package/force-app/main/default/lwc/talkCrmSetup/talkCrmSetup.html:203-215
Sendblue Integration
The Case_Creation.flow-meta.xml also contains a disabled action and a scheduled path related to sendblue, an SMS/iMessage service. This suggests a planned or existing feature to send text message follow-ups to customers after a case is created.
Sources: salesforce-package/force-app/main/default/flows/Case_Creation.flow-meta.xml:40-48, 129-134
Summary
The Zendesk integration is a powerful automation feature within TalkCRM that connects Salesforce support cases to the Zendesk ticketing system. Triggered automatically upon Case creation—which can be initiated via the AI assistant—the system uses a Salesforce Flow and an Apex class to create a ticket in Zendesk and sync the ticket ID back to the Case. This creates a seamless workflow between CRM and the support platform, reducing manual effort and ensuring data consistency.