# 360 SMS incoming-text setup

Caller Intelligence 0.5.0 includes a 360 SMS Open API adapter for incoming SMS. It uses the same caller lookup, Salesforce matching and Recent activity workspace as smrtPhone. The adapter has automated tests; a customer account must still be activated and tested with an actual inbound text.

360 SMS offers separate CTI calling features. This Open API connection does not connect voice calls, ringing, recordings, or outbound messaging. The referenced guide documents incoming messages and outgoing delivery callbacks, not an incoming-call event. No call payload or package-specific Salesforce object names are assumed.

## For the customer's Salesforce administrator

1. Arrange assisted installation or an update to Caller Intelligence 0.5.0 or later. Have a DealMachine account with API access and an administrator for 360 SMS available.
2. Choose the business numbers whose incoming texts should appear in Caller Intelligence. Assign one Salesforce user to each number. The Open API message does not identify the rep handling a shared line, so this release uses fixed number-to-user routing, not dynamic assignment or team-wide broadcast.
3. Have the installation specialist provision a private 360 SMS connection URL and configure those assignments. Open **Caller Intelligence → Connect accounts**, choose **360 SMS · incoming texts**, and save the number and supplied URL.
4. Ask 360 SMS support to enable Open API incoming-message forwarding to that URL. Confirm that the native 360 SMS Salesforce inbox, message logging and existing delivery callbacks continue working. This integration does not configure or replace those workflows itself. Do not substitute our URL for a native inbound handler without 360 SMS confirming how both consumers receive messages.
5. Send a real SMS from another phone to each connected business number. Confirm it reaches both the intended Salesforce user's Caller Intelligence panel and the existing 360 SMS inbox. The setup screen verifies a text; it will not ask for an unsupported call test.
6. Send another text while the first profile is open. It should wait in **Recent activity** until the rep selects it. Verify another rep does not see messages assigned to the first rep.

The private URL authorizes delivery and must be shared only through your secure account-setup channel. The receiving integration does not ask for a 360 SMS outbound API client ID or send any messages. Your DealMachine key remains encrypted inside Salesforce.

## For the installation specialist

Use an isolated organization connection in the private `CALLER_CONNECTIONS_JSON` configuration. Preserve every other customer entry. An example is included in the repository's `docs/hosted-connection.example.json`.

Required settings in addition to the connection's token, OAuth authorization, account ID, `receivingNumbers` and `users`:

```json
{
  "sms360Enabled": true,
  "sms360Recipients": {
    "+15125550123": "005_REPLACE_WITH_SALESFORCE_USER_ID",
    "+15125550124": "005_REPLACE_WITH_ANOTHER_USER_ID"
  }
}
```

Replace placeholders with active Salesforce user IDs and normalize receiving numbers to `+1` format. `users` may be an empty object for a 360-only connection. Every mapped number must also be in `receivingNumbers`. A `pilotRecipient` fallback and any recipient/user fields supplied in the webhook body are ignored for 360 SMS.

The incoming endpoint is `POST https://salesforce.dealmachine.com/hooks/360sms/YOUR_PRIVATE_TOKEN`. Provision it only for the intended org. The adapter is disabled unless `sms360Enabled` is exactly `true`. Saving settings in the Salesforce screen does not enable the hosted adapter or change its routing.

The receiver expects the guide's JSON fields: `sms_id`, `delivery_status`, `body`, `from` and `to`. Only `delivery_status: "received"` produces a text interaction. Outgoing delivery callbacks receive 202 without creating caller records. The stored source is **360 SMS** and the provider event is `received`. Body size is limited to 64 KiB; stored text is limited to 32,768 characters. North American phone numbers are currently supported; other countries require extending the app's existing number handling.

Retries use an event key scoped to organization, provider, message ID, receiving number and assigned user. Salesforce deduplicates that key. HTTP 200 means Salesforce accepted the interaction; 400 indicates invalid data or missing routing; 404 covers missing authorization or a disabled adapter; 413 indicates an oversized body. Delivery failures return 503. Hosted responses include `Retry-After: 10`, but 360 SMS retry guarantees have not been verified. Monitor delivery results and arrange replay of failures with the provider; there is no durable retry queue yet.

Optional provisioning helper, from the repository with the intended org's local config and token:

```sh
node --env-file=.env scripts/provision-connection.mjs https://salesforce.dealmachine.com 360sms +15125550123
```

This updates the single connection displayed in Salesforce setup. Existing hosted providers can coexist with separate mappings, but the setup screen displays one selected provider/number at a time. Do not run the helper against an existing smrtPhone pilot merely to preview 360 SMS instructions. Configure the actual customer's connection and retain their current routing and authorizations.

## Verification and remaining requirements

Before customer activation, confirm 360 SMS's actual POST/content type, forwarding arrangement, delivery authentication, retry behavior and any Open API entitlement or fees. The implementation follows the public incoming-message contract; account-specific configuration cannot be verified without an account. 360 SMS support must confirm the forwarding arrangement preserves its native Salesforce behavior.

Official reference checked September 10, 2026: [360 SMS Open API guide](https://360smsapp.com/wp-content/uploads/2024/05/Open-API-Guide-Integration.pdf), pages 4–5. [360 SMS CTI calling overview](https://360smsapp.com/blog/cti-integration-in-salesforce-for-refined-contact-center-operations/). These are vendor capabilities; live 360 SMS delivery into this app has not yet been verified.
