---
title: "Creating Object Mappings for the Inbound Data Sync AFAS"
canonical: "https://help.fieldbuddy.com/space/FBDOCS/2078310753/Creating%20Object%20Mappings%20for%20the%20Inbound%20Data%20Sync%20AFAS"
format: markdown
---
The Inbound Data Sync retrieves all data from the external system according to the Object Mapping configuration. In the following chapters a few example configurations will be created in a step-by-step process.

## Important Considerations

1. It is possible to take Last Successful Sync Date into account via filtering. Last Successful Sync Date will be substituted instead of `LAST_SYNC_DATETIME`

## Sample Configuration - Importing Accounts

In this example FlexConnect will be importing Persons and Organizations from AFAS into the standard Accounts object in Salesforce.

Make sure to have test data available in AFAS.

You need to have an AppConnector with a Getconnector. See link below how to create an Appconnector and add a GetConnector to it.

[AFAS Connectors to retrieve Objects and fields of AFAS](https://upperdeck.atlassian.net/wiki/spaces/FBDOCS/pages/2078310726)

If you start an import, make sure to have enough data space in your organisation.

### Steps - Creating the Object Mapping

1. Go to the Page 'Object Mapping' and select your object mapping.
2. Click the button 'New Object Mapping' and fill in the following data:

![image](media://5aef6f4a-b2a5-455d-be4e-95bf9c5998c7)


| **Field** | **Data** |
| --- | --- |
| Object Mapping Name | Account- Organization-Person |
| Service Provider | <your service provider name> |
| Sync Direction | Inbound |
| Operation Type | Upsert |
| Execution Order |  |
| Filter Criteria |  |
| Is Active | True |
| Is Required | False |
| Internal Object | Account |
| Parent Object Mapping | - |
| Endpoint URL | /<YourGetConnectorName> |
| External Id field | BcCo |
| External Objects | Accounts |
| Internal field for external Id | AFAS_External_Id__c |
| Last Sync Datetime API | AFAS_Last_Sync__c |
| Sync Check API | AFAS_Is_Synced__c |
| Description |  |


### Steps - Creating the Field Mapping

1. Go to the Page 'Service Provider' and select your Service Provider.
2. Click the Object Mapping named 'I: Account - Organization-Person' for Inbound.
3. Click the 'New Field Mapping' button.
4. Select Record Type 'AFAS'
  
  
6. Input the following data by creating separate Field Mappings for each row in this table (Use the Object Mapping 'Account-Accounts' for every Field Mapping you make). Use the 'Save & New' option to quickly created multiple fields. If a column title in the table down below is not available in your 'Add Field Mapping' screen, than you have to edit the 'Screen Layout'. You can do this by clicking the arrow at the right side of your screen and then click 'Edit Layout'.
  
  
7. **Validate your Salesforce fields**
  1. Press on the "Validate Salesforce fields" button to validate your fields and see if you didn't make any mistake

You are done and ready to test the Inbound Data Sync.