---
title: "Configuring an Integration with SAP"
canonical: "https://help.fieldbuddy.com/space/FBDOCS/2078310899/Configuring%20an%20Integration%20with%20SAP"
format: markdown
---
> Macro (excerpt)
> 
> > ❌ Raw instructions for configuring an integration with SAP.
> 
> | **0. Performing tests with Postman** |
> | --- |
> | Testing of the SAP API can be performed using this Postman Collection: |
> 
> | **1. Setting up a service provider** |
> | --- |
> | ### Create new Service Provider:<br>- Provider type: SAP.
> - Protocol: REST.
> - API Endpoint URL: (currently set to) [https://sapwi.ipparking.nl:8443/B1iXcellerator/exec/ipo/vP.0010000101.in_HCSX/com.sap.b1i.vplatform.runtime/INB_HT_CALL_SYNC_XPT/INB_HT_CALL_SYNC_XPT.ipo/proc?fieldbuddy/](https://sapwi.ipparking.nl:8443/B1iXcellerator/exec/ipo/vP.0010000101.in_HCSX/com.sap.b1i.vplatform.runtime/INB_HT_CALL_SYNC_XPT/INB_HT_CALL_SYNC_XPT.ipo/proc?fieldbuddy/v1=contactpersons)
> - Schedule Job Interval: Required only if scheduled sync is planned.
> - All other fields are not used and should remain empty.<br>![image](media://d05002b1-dedb-4286-bfdd-4311b875a955)<br>### Create new Service User:<br>- Press 'Sync Data' on the Service Provider page.
> - Enter user & password.<br>> ℹ️ Username and password will not be verified at this point. Either use the API tool or press Sync Data after the entire configuration is done, to verify username & password are correct. |
> 
> | **2. Inbound sync: Configuring object mappings (Example: businesspartners with child object contactpersons)** |
> | --- |
> | ### Prepare objects:<br>- On objects 'Account' and 'Contact' create a new field, type text, length 255, tick 'external id', name 'SAP External Id' (API Name: SAP_External_Id__c).<br>### Create new Parent Object Mapping:<br>- Service Provider: Use service provider as created in step 1.
> - Maximum Page Requests: set to the maximum amount of pages that will be requested in 1 sync operation. This example uses the maximum: 1000.
> - Objects Per Page Request: set to the maximum amount of records that will be requested per page request (call-out). This example uses 50.
> - Batch size: How many records will be processed in 1 batch. This example uses 100.
> - Record type: SAP.
> - Sync direction: Inbound.
> - Operation type: Upsert.
> - Execution order: if more then 1 parent object mapping is used, you can enter the order number of this object mapping.
> - Parent object mapping: Leave empty - this is a parent object mapping itself.
> - Internal object: Account.
> - Internal Field for External Id: SAP_External_Id__c (or other field name, as created at the start of this step).
> - External object: businesspartners.
> - External Id Field: cardcode.
> - Sync check API & Last sync datetime API: Fill with SF Object Custom Field API Name if in use.
> - Is active: tick.
> - Use last succesful sync datetime: tick if you want only new records to be synced.<br>![image](media://e46a480b-e4e1-4b35-a2db-cc345256f3a5)<br>### Create Field Mapping for object mapping 'Accounts - Businesspartners' (in this example, only the name is synced):<br>- Create with data from screenshots below:<br>![image](media://8e9c0427-1e7d-4ff5-a522-25d675c62938)<br>### Create new Child Object Mapping:<br>- Create in the same way as the parent object mapping, with below exceptions.
> - Parent object mapping: enter the 'Accounts - Businesspartners' object mapping that we created above.
> - The sync operation uses most field values of the parent object mapping. Therefore, leave these fields empty:
>   - Maximum Page Requests
>   - Objects Per Page Request
>   - Batch size
>   - Execution order
>   - Use last succesful sync datetime
> - <u>NOTE: Internal object must now be set to the relationship name, in this case Contacts. (shown incorrectly in below screenshot).</u><br>![image](media://4103764d-9087-4390-bfe0-c1a82caeb274)<br>### Create Field Mapping for object mapping 'Contacts - Contacpersons' (Name):<br>- Create with data from screenshots below:
> - Although not used for filling the lookup to account, it is advisable to create a field mapping for cardcode - sap account id.<br>![image](media://56dde789-9a18-4a56-a255-dc5f9b44d3bc) |
> 
> | **3. Inbound sync: Testing** |
> | --- |
> | ### Start the sync operation:<br>- Go to the Service Provider (SAP).
> - Press 'Sync data'.<br>### Test if sync went well:<br>- Go to audit trails. Check if an audit trail was created.
> - Ensure audit trail status is succes, or check errors in the log.
> - Check if you can find inserted accounts & contacts, and if the lookup was created succesfully. |
> 
> | **4. Outbound sync PUT: Setup** |
> | --- |
> | ### Object mappings & field mappings:<br>- General note for outbound sync: Set operation type to 'Upsert'. If a triggered record as an external ID set, an update will performed. Otherwise an insert will take place.
> - Ensure 'Outbound' and 'Upsert' set.
> - Fields not used - leave these empty:
>   - Maximum Page Requests
>   - Objects Per Page Request
>   - Batch size
>   - Execution order
>   - Use last succesful sync datetime
> - On field mappings: Linking fields & 'Is required?' must stay empty.<br>![image](media://3a6b71a7-0ba3-411e-a4a8-d7e4220f122f)<br>![image](media://8d7a22b9-6aa1-4a71-b94a-5bd52305b281) |
> 
> | **6. Inbound sync PUT: Testing** |
> | --- |
> | ### Start the sync operation:<br>- Go to an account with SAP External Id filled. Update account.<br>### Test if sync went well:<br>- Go to audit trails. Check if a audit trail was created.
> - Ensure audit trail status is succes, or check errors in the log.
> - Check SAP if update was successful. |
> 
> | **7. Outbound sync POST: Setup** |
> | --- |
> | ### Object mappings & Field mappings:<br>- General note for outbound sync: Set operation type to 'Upsert'. If a triggered record as an external ID set, an update will performed. Otherwise an insert will take place.
> - Ensure 'Outbound' and 'Upsert' set.
> - Fields not used - leave these empty:
>   - Maximum Page Requests
>   - Objects Per Page Request
>   - Batch size
>   - Execution order
>   - Use last succesful sync datetime
> - Filter criteria: fill in criteria, to be used in where clause of record query, so that a sync only takes place when these criteria are met.<br>> ⚠️ **Note**
> > ⚠️ 
> > ⚠️ Although not shown on this screenshot, be sure to fill in Filter Criteria like "Status = 'Final'". Filter criteria must only be filled in on the parent object mapping.<br>![image](media://b61a52ec-abd7-4fcf-9536-88442e0c4074)<br>![image](media://357cfc35-a699-4ce6-9d00-261efdbd0c1e)<br>### Child object mappings & Field mappings:<br>- Ensure parent object mapping is set correctly.
> - Internal object: Fill in API name of the (child) relationship. For example: When the parent object is Work_Order__c and child object Work_Order_Part__c, the relationship name is <span style="color: #000000">Work_Order_Parts__r.</span>
> - Fields not used - leave these empty:
>   - Maximum Page Requests
>   - Objects Per Page Request
>   - Batch size
>   - Execution order
>   - Use last succesful sync datetime
> - Id fields are not used for object lines, as SAP childrecords dont have their own Id at this moment. Leave these empty as well:
>   - Internal Field For External Id
>   - External Id Field
> - On field mappings: Linking fields & 'Is required?' must stay empty.<br>> ℹ️ Below screenshots are not entirely according above instructions. Be sure to follow the written instructions.<br>![image](media://61040659-e683-4609-943c-0721e752adf6)<br>![image](media://6628460e-ca4e-4939-bfee-48ccd8415aaf)<br>![image](media://7069c0bb-b5ef-40b0-9a7c-3db59bc9d610) |
> 
> | **8. Outbound sync POST: Testing** |
> | --- |
> | ### Start the sync operation:<br>- Insert a purchase request with lines.<br>### Test if sync went well:<br>- Go to audit trails. Check if a audit trail was created.
> - Ensure audit trail status is succes, or check errors in the log.
> - Check SAP if insert was successful. |