🤝 What is the Salesforce integration process with MyOperator?

🤝 What is the Salesforce integration process with MyOperator?

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


🧭 Table of Contents


📈 What this integration enables

  • Auto‑create Leads on inbound calls when no match is found.
  • Task logging on calls (duration, status, start/end time).
  • Outbound calling from a Lead/Contact via a Quick Action.
  • Recording URLs attached to Tasks (if recording is enabled).
  • Auto‑assignment of Tasks to users via UUID/email mapping.

Visual placeholder
MyOperator ↔ Salesforce — Inbound call → (Lead create + Task), Outbound → (Quick Action → call), Recording URL → Task.

Back to top


✅ Prerequisites

  • Salesforce Enterprise+ (API access) with Lightning enabled.
  • Salesforce Admin rights; Developer Console access for Apex.
  • MyOperator account with call recording (optional) and admin access.
  • A test Lead/Contact and a test number for validation.

Back to top


🔐 Security model & tokens

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

CompanyId

Your MyOperator account identifier

publicivrid

IVR/public routing ID for call flows

secretToken

Shared secret used by the integration

xapiKey

API key for authenticated requests

Default_MyOperator_Task_Owner

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.

Back to top


🧾 Data model & mapping

User mapping
Create a User custom field to hold the MyOperator UUID:

Object

Field

Type

Example

User

MyOperatorId__c

Text (255)

a1b2c3d4-...

Task logging fields (examples—adjust to your schema):

Object

Field API Name

Type

Example value

Task

Call_Duration__c

Number (0,0)

145

Task

Recording_Url__c

URL

https://...mp3

Task

Call_Status__c

Picklist

Answered, Missed

Task

Call_Event__c

Picklist

Inbound, Outbound

Back to top


🪜 Step‑by‑step setup

1) Prepare Salesforce

  1. Custom Labels: create the labels listed above.
  2. User field: add MyOperatorId__c (Text) on User.
  3. Task fields: add the call‑logging fields on Task.
  4. Profiles/Perms: grant field‑level security + page layouts (Task & User).

2) Create Apex classes (Developer Console)

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.

3) Build the Lightning Quick Action

  • Aura Component: CreateCallCmp that lets agents pick a number and press Make Call.
  • Add as a Quick Action on Lead (and optionally Contact/Account) layout.
Prefer LWC in new orgs; keep API contracts identical to the Aura version.

4) Configure a Connected App

  • Scopes: api, web, refresh_token, offline_access.
  • Callback URL: sfdc://oauth/restapi/success.
  • Capture Client ID/Secret.

5) Register Remote Site Settings

Add (example for recordings/CDN):

https://myoperator-sounds-v2.s3.ap-south-1.amazonaws.com

6) Finish in MyOperator Connect

  • Add callback URL (your API/Gateway endpoint receiving Salesforce‑bound events).
  • Open MyOperator Connect → Salesforce, configure token/user mapping.
  • Example endpoint format: https://<api-id>.execute-api.<region>.amazonaws.com/<stage>
    Example from internal docs: https://gyxpvc1c0a.execute-api.ap-south-1.amazonaws.com/sumit_arya

Back to top


🔎 Validate the integration

Perform both Inbound and Outbound tests.

Inbound test

  1. Call your MyOperator number from a test phone.
  2. In Salesforce, confirm:
    • Lead auto‑created (if unknown)
    • Task logged with duration, status, event, optional recording URL
    • Owner mapped by User.MyOperatorId__c (or default owner)

Outbound test

  1. Open a Lead and click Make Call action.
  2. Ensure the call bridges; a Task logs with correct direction and owner.

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.”

Back to top


🎯 Expected outcomes

  • Call metadata (status, duration, start/end) appears on Task records.
  • Recording URLs (if enabled) are attached to Tasks.
  • Auto‑created Leads for new callers; existing people get Tasks on the right record.
  • Ownership aligns via UUID/email mapping.

Back to top


🧰 Troubleshooting

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 xapiKey/secretToken or missing Remote Site

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 User.MyOperatorId__c; update Connect mapping

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 HttpCalloutMock; avoid SeeAllData=true

Still stuck? Email support@myoperator.com with timestamps, example numbers, Task Ids, and screenshots.

Back to top


🙋 FAQs

  • Do I need a Marketplace app?
    No—the integration is enabled via backend + Apex/metadata in your org.
  • Can we log to existing Deals instead of creating Leads?
    Yes—your backend configuration can update existing records or log Activities only.
  • Is LWC required?
    No—Aura is fine; LWC recommended for new builds.
  • Where do secrets live?
    Use Custom Labels or Named Credentials; restrict visibility via profiles/perm sets.

Back to top


🔗 Related articles

  • Salesforce: Create a Connected App — scopes, callback, OAuth basics
  • Salesforce: Custom Labels & Named Credentials — store secrets safely
  • Salesforce: Build a Quick Action (Aura/LWC) — add to Lead layout
  • MyOperator Connect (Salesforce) — token & user mapping
  • CRM call logging troubleshooting — common causes & fixes

Back to top


🔎 Structured data (SEO)

<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>

Back to top


🏷️ Keywords

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

Back to top

    • Related Articles

    • What is the Salesforce integration Process with MyOperator?

      Process: When Incoming calls land to the MyOperator Panel, post integration Lead is created. If client calls first time to the service number it will create a Lead , if client calls second time it will create an Activity and process goes on if ...
    • How does the Salesforce integration with MyOperator work (inbound + outbound calls, auto‑logging, recordings)?

      ? Goal: Connect MyOperator telephony with Salesforce so you can: (1) auto‑create/update leads on inbound calls, (2) initiate outbound calls from Salesforce, and (3) auto‑log call activities with recording links—without manual entry. ? Table of ...
    • How the Salesforce integration works?

      New Lead will be created whenever there is an incoming call on MyOperator. Leads are created with auto filled details. Under “Open Activities” you will get the details about duration and recording URL of the Call. Activities are created once lead is ...
    • Key Considerations During Integration with MyOperator

      ? Table of Contents Overview Key Considerations for a Smooth Integration Step-by-Step Integration Process Final Checklist FAQs Related Articles ? Overview Integrating MyOperator with other platforms such as FreshSales, FreshDesk, or Zoho requires ...
    • Zoho Sales CRM + MyOperator Integration Guide

      ? Table of Contents What are the Key Capabilities of the Integration? What are the Prerequisites for Integration? How Does the Data Flow Between Zoho CRM and MyOperator? What Are the Steps to Sync Users? What Are the Integration Steps? ...