In this guide: Salesforce orders · Field mapping · Task creation · Delivery management · Salesforce updates · Validation
1. Configure Salesforce sales orders
Display the linked SuiteFleet task, sync status, delivery date, and receiving window on the Salesforce order.

1.1 Prerequisites
| Component | Configuration required |
|---|---|
| Salesforce environment | API access, integration user, sandbox, and the selected order and line-item objects |
| SuiteFleet environment | Test workspace, authorized connection, customer and hub identifiers, units of measure, and delivery time zone |
| Connector configuration | Source object, eligibility condition, outbound mapping, return mapping, and supported transport |
| Integration persistence | Unique order/shipment-to-task mapping, processing state, retry metadata, and event deduplication records |
1.2 Object selection
Select Order, OrderSummary, or the org’s custom order object. Configure its line-item relationships, field API names, and lifecycle rules. See the Salesforce Order reference.
| Entity | Integration responsibility |
|---|---|
| Order header | Customer reference, shipping address, release status, requested delivery date, and receiving window |
| Order line | Stable line ID, product reference, deliverable quantity, and unit of measure |
| Shipment / fulfillment | Delivery grouping and quantities assigned to each SuiteFleet task |
| Delivery result | Task reference, execution status, completion timestamp, delivered quantities, and exception reason |
1.3 Identity and cardinality
- Correlation key:
orgId:sourceRecordId:shipmentId. - One shipment maps to one delivery task in this design. Split deliveries require distinct shipment keys.
- Persist the task ID returned by SuiteFleet. Store the Salesforce order number separately as a display reference.
- Keep source line IDs in the mapping to support quantity updates and partial delivery.
1.4 Export eligibility
Evaluate eligibility after the source transaction commits. Map the release condition to the org’s fulfillment status, such as Waiting to Fulfill.
Export released orders from the queue. Exclude unreleased and fulfilled records.

eligible = releaseStatusMatches
AND businessHoldsCleared
AND requiredDeliveryFieldsPresent
AND deliverableQuantity > 0
AND shipmentNotCancelled
AND noExistingTaskForShipment
Update existing mapped tasks when orders change. Replayed release events must not create duplicates.
2. Map Salesforce fields to SuiteFleet
Authorize Salesforce REST API access through OAuth. Validate outbound and return mappings in a sandbox before production deployment.
- Connect a Salesforce sandbox to a SuiteFleet test workspace using the supported authorization flow. Record which org and workspace are paired.
- Assign the integration user a permission set with read access to the source objects and fields, plus write access to delivery results and exception records.
- Configure the fulfillment eligibility rule and the connector’s supported trigger. For a custom implementation, choose a record change event, Salesforce automation, or scheduled read, and give one process ownership of task creation.
- Map source fields, delivery units, time zones, and return fields. Store credentials in managed secret storage and define token renewal and revocation handling.
Outbound mapping: Salesforce → SuiteFleet
Replace example __c names with your org’s API names. Bind each destination to its connector field.

| Salesforce source | SuiteFleet destination | Example / transformation |
|---|---|---|
| Org ID + source record ID + shipment key | Correlation mapping | Persist IDs separately from display references |
| Order / Order Summary Number | Customer order reference | SO-10482 |
| Account name and receiving contact | Consignee / customer | Lone Star Supply Co.; include contact details when required |
| Shipping street, city, state, postal code, country | Delivery address | 2450 Distribution Way, Dallas, TX 75212, US |
| Requested_Delivery_Date__c | Delivery date | October 14, 2026; serialize using the destination contract |
| Receiving_Window_Start__c / Receiving_Window_End__c | Receiving window | 08:00–12:00 America/Chicago; retain date and zone |
| Order lines / Total_Cases__c | Task items and quantity | 120 cases; preserve line identifiers and unit of measure |
| Shipment_Weight_Lb__c | Shipment gross weight | 2,400 lb; convert if the workspace uses a different unit |
| Delivery_Instructions__c | Delivery notes | Dock 3; call before arrival |
| Fulfillment location | Hub / origin | Resolve Dallas DC to the configured SuiteFleet ID |
| Payment terms | Collection instructions | Net 30; do not treat the order total as cash on delivery |
Validate addresses, quantities, identifiers, units, and receiving windows. Report field-level errors. Resolve customer, hub, and company IDs from workspace configuration.
3. Create SuiteFleet delivery tasks
3.1 Task creation sequence
- Receive the release event or read an eligible order through the configured connector transport.
- Read the committed header, lines, and shipment data. Re-evaluate eligibility.
- Acquire the correlation key and check for an existing task mapping.
- Validate and transform the outbound fields. Persist the pending operation before submitting it.
- Create the task through the supported connector interface.
- Persist the returned SuiteFleet task ID against the shipment key.
- Write the task reference and successful sync timestamp to Salesforce. Mark the operation Synced after all required writes succeed.
If task creation succeeds but Salesforce writeback fails, retry writeback with the saved task ID.
Task creation through the API
For custom adapters, use SuiteFleet’s task creation API: POST https://api.suitefleet.com/api/tasks. Map customerOrderNumber, deliveryDate, and UTC receiving times. Example: 08:00–12:00 America/Chicago on 2026-10-14 converts to 13:00–17:00 UTC. Account for date rollover.
Validate the full task schema, including customer, consignee, task and delivery types, quantities, weight, value, volume, and COD amount. Use connector mappings for packaged deployments; use the API for custom task creation.
Prevent duplicate tasks
Enforce a unique orgId:sourceRecordId:shipmentId key and serialize competing creates. Reconcile ambiguous timeouts before retrying. Use provider idempotency where supported. Send post-dispatch changes for review.
4. Delivery assignment, execution, and exceptions
Review imported tasks, Salesforce references, dates, quantities, and driver assignments before delivery dispatch.

Assign delivery resources, dispatch tasks, and record progress in SuiteFleet. Preserve shipment mappings through reassignment or rescheduling. Track assignment, execution, and sync status separately.
Delivery planning with the lasso tool
Use Lasso select in Workbench to group delivery tasks on the map. Check receiving windows, quantities, and capacity before assignment and dispatch. Each task retains its Salesforce reference.

4.1 Delivery lifecycle configuration
Map supported connector statuses to these operational states. These labels are integration mappings, not provider API values.
| State | Operational action | Salesforce update |
|---|---|---|
| Awaiting assignment | Review the address, delivery date, receiving window, and quantities | Store the task reference and pending dispatch status |
| Assigned | Allocate a driver and delivery resources | Update assignment details where mapped |
| Dispatched / in transit | Release the delivery and monitor execution | Update delivery progress and the latest status time |
| Delayed / failed attempt | Record the reason and decide whether to reschedule or escalate | Record the exception and required follow-up |
| Partially delivered | Confirm received quantities and retain remaining work | Update delivered and outstanding quantities per line |
| Delivered | Confirm all required quantities and completion conditions | Write the completion result and recompute order delivery status |
| Cancelled | Stop the affected task through the supported cancellation workflow | Record cancellation without reporting delivery completion |
4.2 Delivery changes and exception handling
Update addresses, windows, and quantities only when execution status permits; dispatched tasks require review. Preserve failed-attempt history and shipment links when rescheduling. Give unresolved exceptions an owner and next action.
4.3 Delivery-result fields
Bind these logical result fields to the connector’s actual completion schema.
| Field | Type | Processing rule |
|---|---|---|
| Event identity / source version | String | Identify duplicate or stale results; persist before processing |
| Task ID | Provider identifier | Resolve to exactly one stored shipment mapping |
| Delivery outcome | Mapped status | Differentiate completed, partial, failed, and cancelled outcomes |
| Completion time | UTC DateTime | Store the actual delivery time separately from sync time |
| Delivered lines | Collection | Source line ID, delivered quantity, and unit of measure |
| Tracking reference | URL / identifier | Store the permitted tracking link on the associated Salesforce delivery record |
| Recipient | String | Write to the received-by field when captured |
| Exception reason | Code / text | Required for unsuccessful or incomplete delivery under the configured business rules |
4.4 Completion rules
- Validate delivered quantities against the shipment’s assigned quantities.
- Record partial delivery at line level and retain the outstanding quantity.
- Keep failed attempts and cancelled tasks outside delivered quantity totals.
- Close the delivery only after all configured completion requirements are satisfied.
Link proof of delivery when required. Process attachments separately from status and quantities.
5. Update Salesforce after delivery
Authenticate callbacks and persist events before acknowledgement. For polling, use durable checkpoints and overlapping reads to prevent missed updates.
- Resolve the original record. Use the saved org, source-record, shipment, and task IDs. Quarantine any result that cannot be matched uniquely.
- Validate the outcome. Check task identity, delivered quantities, completion time, and exception reason. Deduplicate repeated events and reject stale updates that would regress a completed delivery.
- Write delivery fields. Update the configured delivery record or fields and line-level delivered quantities. Aggregate multiple shipments before declaring the whole order delivered.
- Update exceptions. Write the failed-attempt or partial-delivery reason and outstanding quantities. Preserve unresolved work for follow-up or rescheduling.
- Record success. Mark synchronization successful only after Salesforce accepts the writes. Keep delivery occurrence time separate from the integration processing time.
Return mapping: SuiteFleet → Salesforce
Write delivery status, received quantities, completion time, recipient, and the linked task to Salesforce using the return mapping below.

| Delivery result | Recommended Salesforce destination | Example |
|---|---|---|
| Task ID and task URL | Delivery task reference and link | SF-10482 |
| Delivery outcome | Configured delivery status field / related record | Delivered |
| Actual completion timestamp | Delivered-at DateTime | 2026-10-14T15:42:00Z → 10:42 AM America/Chicago |
| Delivered quantities by source line | Delivery lines / fulfillment quantity fields | 120 cases received out of 120 |
| Tracking link | Delivery tracking URL field | Link associated with the mapped task |
| Recipient | Received-by field | Alex Morgan |
| Exception reason and outstanding quantities | Delivery exception and line-level balance fields | 20 cases outstanding; receiving location unavailable |
| Processing result, timestamp, event identity | Integration audit record / sync fields | Synced; event processed once |
Keep delivery status separate from the commercial lifecycle. Map Delivered to a delivery field or object. Check configured values and transitions before updating Order.Status.
5.1 Field ownership and order aggregation
Write only delivery fields, quantities, task references, and exceptions. Preserve pricing, taxes, payment terms, and totals. Configure invoicing and case automation separately.
orderDeliveryComplete =
every required shipment is complete
AND every deliverable line has its required delivered quantity
AND configured completion requirements are satisfied
Apply quantities once per shipment result. Prefer absolute quantities; deduplicate delta events before applying them. Serialize concurrent updates and aggregate order delivery totals from shipments.
5.2 Salesforce Flow configuration
Trigger Flows on committed delivery-state transitions. Persist processing markers to prevent repeated actions. Evaluate completion, outstanding quantities, and sync status in entry criteria.
| Automation | Entry condition | Duplicate control |
|---|---|---|
| Billing workflow | All required shipments complete and billing prerequisites satisfied | Persist the billing handoff reference |
| Customer survey | Delivery completed and customer communication rules satisfied | Record survey dispatch against the delivery |
| Follow-up task | Configured completion or exception outcome | Use a unique delivery-and-action key |
5.3 Prevent synchronization loops
Trigger exports only on release or delivery-input changes. Exclude inbound-owned fields to prevent synchronization loops.
6. Error handling, reconciliation, and validation
6.1 Error classification
| Failure | Required handling |
|---|---|
| Missing or invalid source data | Set Validation Failed; record the field and reason; replay after correction |
| Expired authorization | Renew through the configured authorization flow; stop repeated attempts if renewal fails |
| Insufficient permissions | Route to the integration administrator; resume after permission correction |
| Rate limit / temporary service failure | Use bounded backoff; honor any retry interval returned by the service |
| Task-create timeout with unknown outcome | Reconcile the creation result before submitting another create request |
| Unmatched task or conflicting identity | Hold for investigation; do not update a Salesforce record by customer name or address |
| Stale or duplicate event | Record as ignored; preserve the latest accepted delivery state |
| Salesforce update or evidence transfer failure | Retain pending work and retry the failed operation independently |
6.2 Recovery and reconciliation
Log record, task, and event IDs, operation, attempts, processing time, and sanitized errors. Retry transient failures with bounded backoff. Correct validation and permission failures before replay; escalate exhausted retries.
Reconcile orders without tasks, deliveries awaiting Salesforce updates, and unresolved exceptions. Keep delivery and sync status separate. Assign owners and latency targets for both directions.
6.3 Sandbox acceptance tests
| Test | Expected result |
|---|---|
| Release an eligible order with complete delivery data | One linked task; matching reference, address, lines, units, and receiving window |
| Replay the release event / retry after timeout | No duplicate task or lost correlation |
| Missing address or invalid receiving window | Useful validation error; no dispatchable task |
| Complete all 120 cases | Salesforce delivery status, quantities, recipient, and time reflect completion; total unchanged |
| Complete only 100 of 120 cases | 20 cases remain outstanding; whole order is not marked fully delivered |
| Replay completion or send an older progress event | No duplicate evidence or regressed status |
| Salesforce unavailable or evidence upload fails | Durable pending work; controlled retry; visible sync state |
| Split shipments and a daylight-saving/date-boundary case | Correct task-to-shipment mapping, order aggregation, and local-time display |
| Reschedule a failed delivery attempt | Preserve attempt history and outstanding quantities; retain the shipment relationship |
| Change an address after dispatch | Require dispatcher review before updating the active task |
Deploy mappings, permissions, status rules, and automation together. Test with production-equivalent permissions and active automation in the sandbox. Assign recovery ownership before activation.

.webp)

