---
title: "FieldBuddy Swift Synchronisation"
canonical: "https://help.fieldbuddy.com/space/FBDOCS/4580573186/FieldBuddy%20Swift%20Synchronisation"
format: markdown
---
> Macro (toc)

## FieldBuddy Sync Overview

It can happen that there is information not being shown in FieldBuddy Swift, or Swift can not sync with the FieldBuddy Service Center. In order to make a proper analysis, it is necessary to know the basics  
This is how FieldBuddy Swift synchronisation Works

1. Swift Sync relies on objects **Mobile Sync Log** and **Mobile Sync Request. **Each sync iteration creates each of those 2 records. Mobile Sync Request stores a Sync Id (Number) and has a link to Mobile Sync Log, and Mobile Sync Log stores attachments with all IDs, request and response payload
2. There are 2 types of sync – sync zero, and sync delta. Sync zero returns all data via Briefcase to Swift. Sync Delta returns records that were changed since previous sync (it search by previously stored **Mobile Sync Request’s** Log ID)
3. Each time when FieldBuddy Swift synchronises, it uploads the changes to Service Center (salesforce) and get all the records that were changed since last sync. In case if there are changes that could not be applied, or any other issues – status of Mobile Sync Log will be **Failed. **In the Response.txt attachment, there should be either `errorMessage` in payload, either there should be failed changes. Inside failed change, there will be a reason why it failed (Flow error, limits, validation errors etc)
4. Sync supports (officially) only 6100 records. In case if more information is necessary → it is wise to adjust briefcase to return smaller payload. Way of working can be preserved using online search for Work Order Items for example

## How to reduce payload?

Payload is amount of records which are available offline in FieldBuddy Swift. Those are usually

- Regular Work Orders with all related information (Service Request, Installed Product, Parts and Checklists, Attachments)
- Time Registrations
- Work Order Items that are available offline.

Therefore payload excludes features available online-only, such as 

- Related Work Orders + information
- Online Work Order Items

In case if payload is too big, that often happens due to following reasons:

1. **Too much Work Order items returned** (like parts or checklists with details)  
An advice is to introduce certain separation about what will be available offline (few hundred of records) and adjust briefcase for Work Order Item object to return less data for FieldBuddy Swift for Work Order Items
2. **Too much Work Orders with Checklists** (WOLI + WOLIDs) that are being returned.  
In most cases, this could be adjusted by doing more restriction of data that is being returned to Swift  on Work Order level, for example, from 14 to 7 or less days of Work Orders to be shown in past

## Frequently Asked Questions

- **Can Limit of 6100 be increased?**  
Yes, <u>IF</u> the data-structure allows it. The limit is configured in the back-end. You can go to Swift  Settings in [Configuration panel](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/5365268532), click Show Extra options, open tab Extra Settings, and raise `Max payload size for FieldBuddy Swift` it.
  Calculation of by how much it can be increased can be done by the FieldBuddy Development team, but the hard limit is not more than 10100 records.
- **What if I do not see mobile sync logs for a certain user?**  
It means that user either did not sync, either can not sync due to huge payload that uses all platform limits. Normally there is an prevention mechanism that notices “payload size” before it fails, and report mobile sync log as failed
- **What if I see lots of Failed mobile sync logs?**  
Check the Response.txt for those mobile sync logs. They will have an explanation about what failed. Possible errors:
  - No configuration assigned
  - Too big payload
  - Failed change → check exact error (missing field, server-side validation or flow error, check actual error message)
- **What is payload is too big?**  
It is necessary to reduce that to stay within the limit. Good starting points for it would be following how-to guides
  - [https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/7223902209](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/7223902209)
  - [https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/7222591496](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/7222591496)