> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://myoperator.crisp.help/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How does MyOperator log and sometimes fail to log calls in Freshsales?

## Quick answer

* Every inbound, outbound, or missed call is pushed to Freshsales as a Call Activity
* Match found → activity is appended to the Contact; no match → MyOperator creates a new Contact, assigns an owner, then logs the call.
* Calls are not logged when PhoneBridge is disabled, the OAuth token has expired, or you use dial modes (Customer-first / Parallel) that break owner mapping

---

## Table of Contents

1. [When to use this guide](#2-1-when-to-use-this-guide)
2. [Prerequisites](#2-2-prerequisites)
3. [Six-step configuration](#2-3-six-step-configuration)
4. [What happens after each call type](#2-4-what-happens-after-each-call-type)
5. [When does MyOperator not log a call?](#2-5-when-does-myoperator-not-log-a-call)
6. [Edge cases & field-length limits](#2-6-edge-cases-field-length-limits)
7. [Expected outcome & test commands](#2-7-expected-outcome-test-commands)
8. [Troubleshooting & common errors](#2-8-troubleshooting-common-errors)
9. [Best-practice dial modes](#2-9-best-practice-dial-modes)
10. [Data-flow diagram](#2-10-data-flow-diagram)
11. [Related articles](#2-11-related-articles)

---

## 1. When to use this guide

* You need real-time call logging on Contacts, Deals, and Tasks in Freshsales.
* You want click-to-call, owner auto-assignment, and zero-duplicate contacts.
* You prefer a deterministic recipe that both agents and AI bots can follow.

---

## 2. Prerequisites

| Item | Requirement / where to find |
|---|---|
| Freshsales edition | Growth or higher (API access) |
| MyOperator plan | Growth or higher (CRM integrations) |
| User roles | Freshsales Admin + MyOperator Admin |
| Services | PhoneBridge & OAuth2 enabled |
| Browser | Latest Chrome / Firefox / Edge |
| Number format | Use E.164 (`+15551234567`) in both systems |

---

## 3. Six-step configuration

| # | Action | UI path/command | Expected result |
|---|---|---|---|
| 1 | Enable After-Call Webhook | MyOperator → Settings → Webhooks → AfterCall → Enable | “Webhook enabled” badge |
| 2 | (Optional) Enable Click-to-Call | MyOperator → Settings → Click-to-Call → Enable | “Click-to-Call active” |
| 3 | Verify matching agent emails | Freshsales → Admin → Users; MyOperator → Users | All agents green-checked |
| 4 | Copy Freshsales Domain & API token | Settings → API Settings | Tokens copied |
| 5 | Copy Company ID & Secret Key | MyOperator → Settings → API Integration | Keys copied |
| 6 | Set dial mode | MyOperator → Dialer → Strategy → Balanced / Serial-wise | Dial mode saved |

---

## 4. What happens after each call type

| Event | MyOperator action | Freshsales result |
|---|---|---|
| Incoming — match | Log Call Activity (agent, duration, recording URL) | Activity appended to Contact |
| Incoming — no match | Create Contact → log activity | New Contact + activity |
| Outgoing (Click-to-Call) | Log outbound Call Activity | Activity added to the target |
| Missed call | Log Missed Call Activity if toggle is on | Activity logged or skipped |

|| Info
Missed call logging toggle: MyOperator → Integrations → Freshsales → Missed Call Logging

Expected: Activity appears ≤ 5s (≤ 60s during API throttling) and contains type, direction, agent, duration, disposition, recording URL.

---

## 5. When does MyOperator not log a call?

| Scenario | Why logging fails | Quick fix |
|---|---|---|
| PhoneBridge disabled | Voice channel offline | Enable in Freshsales → Voice & SMS |
| OAuth token expired | Token revoked after 30 days or password reset | Re-authenticate in MyOperator |
| API rate limit > 60 req/min | 429 errors; logs delayed/dropped | Throttle or request a higher limit |
| Do-Not-Disturb number | Legal compliance | Remove the number from the DND list |
| Customer-first / Parallel dial | Owner mismatch | Use Balanced or Serial-wise |
| Duplicate numbers | Same phone in multiple modules | Deduplicate or set “Primary Contact” |
| Field mapping deleted | Mandatory “Phone” removed | Re-map fields |
| Sandbox mismatch | Prod calls → Sandbox org | Match environments |

---

## 6. Edge cases & field-length limits

* Module priority — Freshsales links to the first Contact ID found.
* Subject max length = 255 chars (truncated).
* Description max length = 4,000 chars (truncated).
* UID length ≤ 50 chars.
* Recording URL stored as plain text; Freshsales doesn’t validate HTTPS.

---

## 7. Expected outcome & test commands

Test GET (sanity):
```
curl --request GET \
  --url 'https://acme.freshsales.io/api/activities' \
  --header 'Authorization: Token token=<YOUR_API_TOKEN>'
```
HTTP 200 + JSON array = credentials OK.

Sample POST payload to After-Call Webhook:
```
{
  "uid": "n2.1693821.44210",
  "call_type": "Inbound",
  "phone": "+15559876543",
  "contact_id": 2019827,
  "agent_name": "Jane Doe",
  "call_start": "2025-09-04T08:12:10Z",
  "call_end": "2025-09-04T08:13:40Z",
  "duration_sec": 90,
  "recording_url": "https://files.myoperator.co/rec_12345.mp3",
  "status": "Connected"
}
```

---

## 8. Troubleshooting & common errors

| Symptom | Likely cause | Resolution |
|---|---|---|
| Activity missing | Webhook disabled | See Step 1 |
| `AUTH_INVALID_TOKEN` | Token expired | Regenerate token |
| Wrong owner | Email mismatch | Sync agent emails |
| Duplicate Contacts | Non-E.164 numbers | Enforce E.164 |

Escalate after 30 min unresolved → [support@myoperator.com](mailto:support@myoperator.com) (Tier-2 SLA ≤ 4 h).

---

## 9. Best-practice dial modes

| Dial mode | Accuracy | When to choose |
|---|---|---|
| Balanced (recommended) | ★★★★★ | Even distribution; correct owner mapping |
| Serial-wise | ★★★★☆ | Sticky-agent experience; reliable logging |
| Customer-first | ★★☆☆☆ | Quick customer reach; risk owner mismatch |
| Parallel | ★☆☆☆☆ | Fast ring-all; logs may fail → emergencies only |

Flip-side summary: faster dial modes risk lost or mis-assigned activities.

---

## 10. Data-flow diagram

![](https://content.api.getguru.com/files/view/429014a5-dbd8-4402-93ad-3e8462a4c716)

---

## 11. Related articles

* [What prerequisites and setup steps are required for the Freshsales CRM ⇄ MyOperator integration?](https://app.getguru.com/card/TkXBKgzc/What-prerequisites-and-setup-steps-are-required-for-the-Freshsales-CRM-MyOperator-integration)
* [What fields does the Freshsales–MyOperator integration push into Call Activities?](https://app.getguru.com/card/cRg69LAi/What-fields-does-the-FreshsalesMyOperator-integration-push-into-Call-Activities)
* [How a Webhook Works?](https://app.getguru.com/card/cjg6XeXi/-How-a-Webhook-Works)

---

**Keywords:** Freshsales integration • MyOperator call logging • PhoneBridge • Balanced dial mode • E.164 • After-Call Webhook • Call Activity