Short answer: Enable a Connected App and required custom metadata/fields in Salesforce, deploy Apex + a Quick Action for click‑to‑call and logging, add Remote Site rules, then finish setup in the MyOperator Connect portal to map users and webhooks—finally validate with test calls.
• Applies to: Salesforce Lightning (Enterprise+ with API), MyOperator Web Dashboard • Audience: Salesforce Admin/Developer, MyOperator Admin
Visual placeholder
MyOperator ↔ Salesforce — Inbound call → (Lead create + Task), Outbound → (Quick Action → call), Recording URL → Task.
Connected App (OAuth 2.0)
Create a Connected App with scopes: api, web, refresh_token, offline_access.
Callback URL: sfdc://oauth/restapi/success
Capture Client ID and Client Secret for server‑to‑server calls.
Custom Labels (for secrets/config)
Store integration parameters as Custom Labels (illustrative names below):
Label API Name | Purpose |
| Your MyOperator account identifier |
| IVR/public routing ID for call flows |
| Shared secret used by the integration |
| API key for authenticated requests |
| Fallback Salesforce User Id/Email for Task ownership |
Tip: If your org prefers Named Credentials, you can mirror the above as External Credentials instead of Labels.
User mapping
Create a User custom field to hold the MyOperator UUID:
Object | Field | Type | Example |
|
| Text (255) |
|
Task logging fields (examples—adjust to your schema):
Object | Field API Name | Type | Example value |
|
| Number (0,0) |
|
|
| URL |
|
|
| Picklist |
|
|
| Picklist |
|
MyOperatorId__c (Text) on User.Create the following classes (skeletons shown for reference):
CallDetails.cls (REST endpoint to receive call events)
@RestResource(urlMapping='/myop/call/*')global with sharing class CallDetails { @HttpPost global static void logCall() { RestRequest req = RestContext.request; // Parse JSON body (status, duration, from, to, recordingUrl, userUuid) // Upsert Lead/Person if needed, then enqueue Task creation CreateTask.enqueue(req.getBody()); }}CreateTask.cls (Task creation + assignment)
global with sharing class CreateTask { global static void enqueue(String body) { // parse body → map to fields Task t = new Task( Subject='Phone Call', Status='Completed', WhatId=null, // or related record id OwnerId = resolveOwnerIdByUuidOrDefault(), ActivityDate = Date.today() ); // t.Call_Duration__c = ...; t.Recording_Url__c = ...; insert t; } private static Id resolveOwnerIdByUuidOrDefault(){ /* lookup User by MyOperatorId__c */ return UserInfo.getUserId(); }}CreateCallController.cls (outbound click‑to‑call)
public with sharing class CreateCallController { @AuraEnabled public static String makeCall(Id leadId, String phone) { // Callout to MyOperator using xapiKey/secretToken (from Custom Labels) // Return a status message to the component return 'Call initiated'; }}FileCreationExample.cls (attach recording)
public with sharing class FileCreationExample { public static void attachRecording(Id taskId, String url) { // Create ContentVersion and link to Task (via ContentDocumentLink) }}Add unit tests: CreateCallController_Test, CreateTask_Test, CreateCallMock.
CreateCallCmp that lets agents pick a number and press Make Call.Prefer LWC in new orgs; keep API contracts identical to the Aura version.
sfdc://oauth/restapi/success.Add (example for recordings/CDN):
https://myoperator-sounds-v2.s3.ap-south-1.amazonaws.comhttps://<api-id>.execute-api.<region>.amazonaws.com/<stage>https://gyxpvc1c0a.execute-api.ap-south-1.amazonaws.com/sumit_aryaPerform both Inbound and Outbound tests.
Inbound test
Outbound test
Screenshot placeholder
Alt: Lead with “Make Call” Quick Action and a Task showing duration and recording link.
Caption: “Validation view—click‑to‑call and auto‑logged Task.”
Symptom | Likely cause | Fix |
Tasks not created | Missing FLS or field names don’t match | Grant FLS; verify custom field API names |
401/403 when calling MyOperator | Wrong | Update labels/Named Credential; add Remote Site |
Recording URL not visible | Plan doesn’t include recording or URL blocked | Enable recording; add CDN URL to Remote Site |
Wrong Task owner | User UUID/email not mapped | Populate |
Quick Action missing | Not added to layout/profile | Add to page layout; check Lightning App visibility |
Apex tests fail | Missing mocks or SeeAllData dependency | Add |
Still stuck? Email support@myoperator.com with timestamps, example numbers, Task Ids, and screenshots.
<script type="application/ld+json">{ "@context": "https://schema.org", "@type": "HowTo", "name": "Integrate Salesforce with MyOperator", "tool": ["Salesforce Lightning", "MyOperator"], "totalTime": "PT45M", "step": [ {"@type": "HowToStep", "name": "Prepare Salesforce", "text": "Create Custom Labels, add User.MyOperatorId__c, add Task fields, set FLS."}, {"@type": "HowToStep", "name": "Deploy Apex & Quick Action", "text": "Add CallDetails, CreateTask, CreateCallController, FileCreationExample and tests; add CreateCallCmp as a Quick Action."}, {"@type": "HowToStep", "name": "Connected App & Remote Site", "text": "Create Connected App with api/web/refresh_token/offline_access; add S3/CDN Remote Site."}, {"@type": "HowToStep", "name": "Finish in MyOperator Connect", "text": "Configure callback URL and user/UUID mapping, then validate inbound/outbound calls."} ]}</script><script type="application/ld+json">{ "@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [ {"@type": "Question", "name": "What does the integration enable?", "acceptedAnswer": {"@type": "Answer", "text": "Auto-create Leads, log Tasks with duration/status/timestamps, enable outbound calling from a Quick Action, attach recording URLs, and auto-assign Tasks via UUID/email mapping."}}, {"@type": "Question", "name": "What are the security requirements?", "acceptedAnswer": {"@type": "Answer", "text": "Create a Connected App (api, web, refresh_token, offline_access), store secrets in Custom Labels or Named Credentials, and restrict access with profiles/perm sets."}} ]}</script>Salesforce MyOperator integration, Connected App, Custom Labels, Named Credentials, Remote Site Settings, Apex REST, Quick Action, call logging, recording URL, UUID mapping, click to call