Before debugging, have this ready:Documentation Index
Fetch the complete documentation index at: https://docs.open.cx/llms.txt
Use this file to discover all available pages before exploring further.
- Admin access to both your Salesforce org and your OpenCX dashboard.
- A specific session ID (from Inbox) or Salesforce Case ID where the problem shows.
- The webhook URL shown in Settings → Integrations → Salesforce (for email issues).
Email Cases
Jump to the symptom that matches what you’re seeing.”OAuth credentials won’t save”
: External Client App still activating, or credentials copied incorrectly. Fix: wait 2–10 minutes after creating the External Client App, then retry. Re-copy the Consumer Key and Consumer Secret without leading or trailing spaces. Confirm the Login URL ishttps://login.salesforce.com (production) or https://test.salesforce.com (sandbox).
”Connect to Salesforce fails”
: callback URL mismatch or popup blocked. Fix: in Salesforce, open the External Client App and confirm the callback URL is exactly:platform.open.cx in your browser.
”Handoff runs but no Case appears in Salesforce”
: Apex trigger not deployed or inactive, Named Credential misconfigured. Fix:- In Salesforce Setup → Apex Triggers, confirm
CaseTriggeris active. - In Setup → Named Credentials, confirm
OpenCX_Integrationpoints to the webhook URL from OpenCX (re-copy if it looks stale). - In Setup → Apex Classes, confirm
OpenSalesforceCaseManagementis saved and active.
”AI replies show as sent in OpenCX but the contact never receives the email”
: outbound delivery trigger not deployed, or org-wide email deliverability blocked. A plainEmailMessage insert in Salesforce creates a record in the Case Feed but does not actually transmit the email — transmission requires Messaging.sendEmail() via the OpenCxOutboundEmailSender trigger. If the trigger is missing, the AI reply logs to the Case Feed (showing Status Sent) but never leaves Salesforce.
Fix:
- In Salesforce Setup → Apex Triggers, confirm
OpenCxOutboundEmailSenderexists, is Active, and targetsEmailMessage. If missing, deploy it per Email Cases → Step 3, Trigger 5. - In Setup → Email → Deliverability, confirm Access level is
All email(notSystem email onlyorNo access). - Confirm the integration user’s profile has the Send Email permission.
- Re-send the AI reply from OpenCX. It should now land in the contact’s inbox.
SELECT Id, CreatedDate, FromAddress, ToAddress, Status FROM EmailMessage WHERE ParentId = '<caseId>' AND Incoming = false ORDER BY CreatedDate DESC to confirm outbound records exist in Salesforce. If they do but the contact still doesn’t receive the email, enable a Debug Log for the integration user (Setup → Debug Logs → New with the integration user as Traced Entity), re-send the reply from OpenCX, then open the resulting log and look for the EmailMessage insert transaction — confirm OpenCxOutboundEmailSender executed and didn’t throw. If it didn’t run, double-check in Setup → Apex Triggers that the trigger is still Active.
”Customer replies open a duplicate Case instead of threading into the original”
:OpenCxOutboundEmailSender is missing the call to EmailMessages.getFormattedThreadingToken(em.ParentId), or an older version of the trigger is deployed.
Fix: update OpenCxOutboundEmailSender to the version documented at Email Cases → Trigger 5. The current version appends the threading token to both the subject and the body, which is what Email-to-Case (Summer ‘22+) uses to attach customer replies to the same Case.
You can confirm by opening a recent outbound EmailMessage record on the Case Feed and checking its Subject/Body — you should see a ref:!...:ref token at the end. If the token isn’t there, the trigger is stale.
”Customer replies never reach Salesforce at all”
:REPLY_TO_ADDRESS not set on the outbound trigger, or the reply-to address isn’t registered as a verified Routing Address.
Fix:
- In
OpenCxOutboundEmailSender, confirmREPLY_TO_ADDRESSis set to your customer-facing forwarding address (e.g.support@yourcompany.com). WithoutsetReplyTo(), replies go to the integration user’s personal Salesforce inbox and never reach Email-to-Case. - In Setup → Service → Email-to-Case → Routing Addresses, confirm that same address is listed and its status is Verified. Until verified, Salesforce drops forwarded mail silently.
- Confirm the forwarding itself works: send a plain email to your forwarding address, then check Setup → Email Logs — if no delivery record appears within 30 minutes, the forward is failing before it reaches Salesforce (usually SPF / DMARC). Publish an SPF record on your domain that includes
_spf.salesforce.com, or switch to an SRS-aware forwarder.
”Hit SINGLE_EMAIL_LIMIT_EXCEEDED in the Debug Log”
: the org’s external email cap for the GMT day is exhausted.
Fix:
- Wait for midnight GMT — the counter resets automatically, no code change required.
- If you’re doing heavy iteration in a Developer / trial org (15/day cap), move testing to an Enterprise/Unlimited sandbox (5,000/day). The limit is a hardcoded edition characteristic — it cannot be raised on Dev Edition.
- For high-volume production workloads that exceed 5,000/day, replace
Messaging.sendEmailinOpenCxOutboundEmailSenderwith an HTTP callout to an external ESP (SendGrid / Postmark / Mailgun) via a Named Credential.
setTargetObjectId(contactId) does not bypass this limit for external recipients — that optimisation only applies when the target is a Salesforce User record.
”Gmail forwarding stuck at Unverified”
: Gmail’s forwarding handshake sent a verification code to Salesforce’s long @...case.salesforce.com address; Salesforce received it as a new Case but you didn’t retrieve the code to paste back into Gmail.
Fix:
- In Gmail → Settings → Forwarding and POP/IMAP → click Re-send email next to the pending Salesforce address (sends a fresh code).
-
In Developer Console → Query Editor:
-
Open the newest row and copy the 9-digit confirmation code from the
TextBody. -
Paste the code into Gmail’s verification input → Verify. Status should flip to
Confirmedand forwarding is live.
EmailMessage in Salesforce.
”Rep replies don’t reach the contact”
: webhook not firing or Named Credential URL outdated. Fix: re-copy the webhook URL from Settings → Integrations → Salesforce and update the Named Credential. Confirm the Apex trigger fires on Caseafter insert.
Live Messaging
”MIAW settings won’t save”
: Instance URL format wrong or PEM encoding incomplete. Fix: includehttps:// in the Instance URL (e.g. https://yourcompany.my.salesforce.com). Ensure PEM keys include the -----BEGIN PUBLIC KEY----- and -----BEGIN PRIVATE KEY----- header and footer lines.
”Handoff fails with access token error”
: key mismatch or wrong Auth Key ID. Fix: regenerate the RSA key pair, re-register the public key in your Salesforce Embedded Service Deployment’s Auth Key settings, copy the new Auth Key ID, and update all six fields in the MIAW tab in OpenCX.”Conversation created but no messages appear”
: ES Developer Name mismatch or Omni-Channel not set up. Fix: in Salesforce Setup → Embedded Service Deployments, copy the exact API Name (case-sensitive) and paste it into the ES Developer Name field in OpenCX. Confirm that Omni-Channel routing is configured for this deployment.”Routing attributes missing in Salesforce”
: Omni-Channel flow not reading the attributes. Fix: in Salesforce Setup → Omni-Channel Flows, verify your flow references the attribute names (OpencxSessionId, Chat_Consumer_Type, Origin, Priority, Chat_language). Attributes are only useful if your flow reads them.
Still stuck?
If none of the above resolves the issue, open a support request with:- The session ID from Inbox.
- The error message or unexpected behavior.
- Screenshots of your Salesforce setup (Named Credential, Apex Trigger status, or MIAW Embedded Service Deployment).
Limits & timing
| Value | |
|---|---|
| External Client App activation | 2–10 minutes after creation |
| Handoff retries | 3 attempts with increasing delays |
| Transcript length | Up to 4,000 characters per handoff message |
| Private key display | Redacted after first save — re-enter to change |
Related Documentation
Salesforce overview
Capabilities, supported channels, observability.
Email Cases
Re-verify OAuth, webhook, and Apex setup.
Live Messaging
Re-verify JWT credentials and routing attributes.
Handoff settings
Global handoff rules and office hours.