Salesforce technical integration guide
For Salesforce administrators, security reviewers and IT — how Revial authenticates, what it reads and writes, the permissions it needs, API consumption, failure behaviour and auditing.
This guide describes what Revial does inside your Salesforce org, so you can approve, configure and later audit the integration. For connecting step by step see Connecting Revial to Salesforce; for every field read and written see What Revial syncs with Salesforce.
1. What you are approving
Revial connects as an OAuth client over the Salesforce REST API v60.0 and SOQL. Authorisation is OAuth 2.0 authorisation code with PKCE (S256), completed by one of your users in a browser.
| Property | Value |
|---|---|
| Access model | Delegated only — Revial acts as the user who authorised it |
| OAuth scopes | api, refresh_token, openid |
| Admin rights required | None — no System Administrator, no "Modify All Data", no JWT bearer or client-credentials access |
| Orgs supported | Production and sandbox |
Because access is delegated, object permissions, field-level security, sharing rules and record ownership all apply unchanged. Records the connecting user cannot see do not reach Revial.
2. What your admin has to do
For most orgs nothing — a licensed user clicks Connect with Salesforce, signs in and allows access. Admin involvement is needed when:
| Situation | What to do |
|---|---|
| Your org restricts which connected apps users may authorise | Approve Revial under Setup → Connected Apps OAuth Usage |
| Your org enforces IP restrictions for API access | Relax them for the connecting user, or ask Revial support for its egress addresses |
| You want a dedicated integration user | Create it (section 4) and have that user connect |
| You want to connect a sandbox | Use the sandbox's own My Domain host (section 3) |
| You want Revial to write fields | Grant field-level Edit on them, then map them in Revial |
| You want meeting outcomes in a custom object | Provide the object and field API names to Revial (Appendix A) |
There is no package to install, no metadata to deploy and no Apex.
3. Authentication and token model
| Property | Value |
|---|---|
| Authorise endpoint | https://{loginHost}/services/oauth2/authorize (login screen always shown) |
| Token endpoint | https://{loginHost}/services/oauth2/token |
| Login host | login.salesforce.com for production, or your sandbox's own host |
| Grant types | authorization_code (connect), refresh_token (refresh) |
| Client credentials | Held server-side by Revial, never sent to the browser |
| Post-connect check | GET {instanceUrl}/services/oauth2/userinfo |
| Access token lifetime | Treated as 2 hours from issued_at; refreshed when less than 35 minutes remain |
Login host. Only Salesforce-operated domains are accepted (salesforce.com,
force.com, salesforce.mil, cloudforce.com, sfcrmapps.cn); anything else
is rejected rather than defaulted. The host chosen at connect time is stored and
used for every refresh, so a sandbox connection keeps working after its first
token expiry. Use the sandbox's own host — the generic test.salesforce.com is
accepted, but can land a signed-in user on a different org. The returned instance
URL must be HTTPS on *.salesforce.com or *.force.com.
Token storage. One connection per Revial organisation and provider. Access
and refresh tokens are encrypted at rest (AES-256-GCM). Revial also stores the
instance URL, the connecting user's ID, email and name from userinfo, the login
host and per-connection settings.
Refresh. Up to three attempts with a short backoff. On invalid_grant or a
401 the connection is marked as needing re-authentication and an organisation
admin gets an in-app notification — Revial stops rather than retrying against
your org. If Salesforce returns a new refresh token (rotation), it is stored and
the old one is discarded.
Who may connect on the Revial side. An organisation owner or admin on a
plan with the CRM integration. The flow is rate-limited and protected by a
single-use state and PKCE verifier held server-side, valid for five minutes.
While a Salesforce connection is connected, a second one is refused; a connection
in an error state is refreshed in place and keeps its settings.
4. The connecting user and required permissions
Everything happens as the one connecting user. We recommend a dedicated, licensed integration user — it survives staff turnover and keeps record ownership predictable. A standard sales profile normally grants what is needed.
| Revial needs to… | Permission |
|---|---|
| Use the API | API Enabled |
| Read Accounts, Contacts, Leads, Opportunities | Read |
| Read Events, Tasks, EmailMessage, Notes | Read |
| Read OpportunityStage, OpportunityContactRole | Read |
| File meeting summaries | Create on Task |
| Write mapped fields on Account, Contact, Opportunity | Field-level Edit on those fields |
| Visit Reports (Appendix A, if used) | Create and field-level Edit on the object; Edit on the Event fields it sets; Read on User |
| Delete records, change metadata, administer | Not needed |
The table is a default, not a minimum. Withhold Task create and summaries stop being filed; withhold field-level Edit and mapped fields are not written.
Missing permissions. A 403 INSUFFICIENT_ACCESS on Event, Task or
EmailMessage skips that object, completes the rest of the sync and flags the
connection for attention. A 403 on Accounts, Contacts, Leads, Opportunities or
Notes fails that part of the sync. If field-level security hides one of Revial's
optional fields (such as AnnualRevenue, Phone or Title), Revial drops the
field and retries; a hidden required field fails the query.
5. What Revial reads
Accounts, Contacts, unconverted Leads (IsConverted = false), Opportunities,
active OpportunityStage records, OpportunityContactRole, Events, Tasks (excluding
TaskSubtype Email and ListEmail), EmailMessage including the full TextBody
with EmailMessageRelation, and classic Notes. Queries use explicit field lists and
follow nextRecordsUrl for pagination. The full field list is in
What Revial syncs with Salesforce.
Outside the sync, Revial may also read a User by email, an Opportunity's or
Contact's AccountId, Events and EventRelation (Visit Reports only), and object
describe metadata for the field-mapping screen.
Revial does not read Cases, Campaigns, Chatter, Files or ContentDocument, Lightning notes, record types or field history.
6. What Revial writes
Records are created with POST /sobjects/{Object}/ and updated with
PATCH /sobjects/{Object}/{id}.
| Operation | Details |
|---|---|
| Meeting summary | Create a Task: Subject, Description (plain text), Status Completed, Priority Normal, WhoId contact, WhatId opportunity or account. No ActivityDate or OwnerId |
| Mapped fields | Update the matched Account, Contact or Opportunity — only fields you map |
| Visit Report (Appendix A) | Create the configured object; update the matched Event's configured fields |
Summaries are Tasks rather than Notes because a completed Task appears on the activity timeline where sellers look. Revial never deletes records and never changes metadata.
7. Field mappings
Admins map Revial summary fields and custom extraction fields to fields on
Account, Contact and Opportunity in Organization → CRM Settings → Property
Mapping. Fields that already have a value are left alone unless the mapping is
set to overwrite. Updates are sent as one batch PATCH; if it is rejected, each
field is retried on its own and failures are reported per field.
Stages are normalised by keyword (qualification, needs analysis, proposal,
negotiation); won and lost come from IsClosed and IsWon, and anything else
becomes "other".
8. Sync cadence and API consumption
Revial's calls count against your org's daily API request allocation.
- First sync — a full pull per object, newest first, up to 50,000 records per object. Opportunities are limited to open ones plus those modified in the last 12 months.
- Later syncs — roughly every hour,
WHERE LastModifiedDate > {watermark}in ascending order, so volume tracks changed records rather than org size. - Order — accounts → contacts → leads → stages → opportunities → activities → notes, each as a separate job; a transient failure retries on the next run.
OpportunityContactRole and EmailMessageRelation lookups are batched at 200 IDs per query. Data calls time out after 30 seconds.
Deletions are not detected. LastModifiedDate filtering does not return
deleted records, and Revial does not reconcile them: a record deleted in
Salesforce stays in Revial's copy until you disconnect.
Record cap. If an object has more than 50,000 changed records in one run, the remainder is skipped and not picked up later.
9. Meeting-to-CRM matching
When a meeting is linked to Salesforce records, Revial tries in order and the first match wins:
- Direct — record IDs already attached to the meeting.
- Sticky — the open opportunity the meeting is already linked to.
- Email — attendee emails → contacts → their opportunities, scored.
- Domain — company by website or email domain (no opportunity).
- Company name — name match (no opportunity).
Opportunity scoring favours open deals, the attendee being the primary contact, other attendees on the deal, title similarity, later stages and recent activity. Closed opportunities are excluded. Free-email domains (Gmail, Outlook and similar) are ignored for company matching, so a meeting with only personal addresses may not attach to an account.
10. Security, limits and failure behaviour
- API version: REST and SOQL v60.0.
- Timeouts: 30 seconds per data call.
- Least privilege: three scopes, no admin rights, no app-only access.
- Secrets: client credentials server-side only; tokens encrypted at rest.
- Partial permissions: see section 4.
- Pagination safety: a per-object ceiling of 50,000 records per run.
- Data storage: Revial stores the synced records together with the raw API response for each. They are deleted when you disconnect.
11. Auditing and disconnecting
To see what Revial has done in your org:
- Setup → Connected Apps OAuth Usage — Revial's app, who authorised it, and per-user revoke.
- Setup → Login History — filter by the connecting user.
- API usage — attribute request volume to the connecting user.
- Records written by Revial — completed Tasks (and Visit Reports, if configured) created by the connecting user.
To disconnect:
- In Revial — Disconnect on the Salesforce card. Revial deletes its synced copy and the stored tokens. It does not call Salesforce's revoke endpoint.
- In Salesforce — revoke the app under Connected Apps OAuth Usage, or
deactivate the connecting user. Revial receives
invalid_grant, flags the connection and stops.
Neither removes Tasks or records Revial already wrote.
12. Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| "This app is blocked" | Org restricts connected apps | Approve Revial under Connected Apps OAuth Usage |
| Connected, but sync is empty | The user cannot see the records | Widen the user's role or sharing, or connect a user with broader visibility |
| Emails, Events or Tasks missing | 403 on that object | Grant Read on it |
| A mapped field never updates | No field-level Edit | Grant Edit; Revial reports per-field failures |
| Sandbox connected to production | Generic test.salesforce.com used | Disconnect and reconnect with the sandbox's own host |
| "CRM: Authentication expired" notification | Token revoked, user deactivated or password reset | Disconnect and connect again |
| API usage spike | The first full sync | Expected once; later syncs track changes only |
| Meeting not attached to an account | Only free-email attendees | Expected — free-email domains are not used for matching |
Appendix A — Visit Reports (custom object)
Some organisations file meeting outcomes into a custom object such as
Visit_Report__c, linked to the calendar Event. Revial supports this through
per-connection configuration set up by Revial — no code change in your org.
What you supply:
| Setting | Meaning |
|---|---|
objectName | The object's API name (required) |
notesField | Field that receives the meeting notes (required) |
accountField | Lookup or master-detail to Account (required) |
eventLookupField | Field on Event set to point back at the report (required) |
opportunityField, contactField, subjectField, visitDateField, needsReviewField, dealerCustomerField | Optional fields on the report |
visitReportOwnerField, eventOwnerField | Optional owner fields set to the seller |
eventStakeholderField | Optional stakeholder picklist on the Event |
fieldMap | Extra values assembled from the meeting |
matchStrategy.startWindowMinutes | ± minutes for matching the Event by start time (default 60) |
How the push works:
- Match the Event — an Event starting within the window, linked to a contact resolved for the meeting (also through EventRelation); the closest start time wins. An Event picked by the seller is used directly.
- Resolve the Account — the seller's choice, else the Event's
WhatIdif it is an Account, else that Opportunity's Account, else the Event contact's Account. - Create the record with the configured fields.
- Update the Event — the back-link field and, if configured, the owner and stakeholder fields. Setting the owner field can reassign the Event's owner.
Revial never creates the Event. Distinct outcomes are reported:
no_contacts_resolved (no attendee matched a contact — check the CRM sync),
no_event_matched (no Event in the window — check your calendar sync),
no_account_on_event, and linkFailed (report created, Event update failed —
grant Edit on the Event field and fix the link by hand). A created report is
never rolled back.
What Revial syncs with Salesforce
For your Salesforce administrator and whoever reviews the integration's data access — every Salesforce field Revial reads, everything it writes back, and the known gaps.
Connecting Revial to Microsoft Dynamics 365
Finding your instance URL, connecting with Microsoft sign-in or an Entra service account, and the admin consent your IT administrator may need to grant.