# Entity Mapping/Import

The web services and values defined in the Entities tab are available in the next tab, Entity Mapping/Import. This screen allows users to import ERP fields from Sage. Customers for example along with their respective contacts can be imported into Salesforce Accounts and Contacts. The import routine can be run as needed or automated to a set schedule.

1. Login into Salesforce, navigate to the **GUMU**™ **Settings** app and click on the **Entity Mapping/Import** tab (you will notice default mappings that were created during the installation process)

**Note:** If you are unable to click the buttons, go to Session Settings >  Lightening Web Security and uncheck the Use Lightning Web Security for Lightning Web components and Aura components checkboxes

<figure><img src="https://794987320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCRVg-TYx3gVa2Tqtf_%2Fuploads%2FG2SCFACaD9aKCiEHC0MN%2Fimage.png?alt=media&#x26;token=928c798a-cc49-44cb-b3e7-e84b721777ac" alt=""><figcaption></figcaption></figure>

2. You need to sync the import routines one by one, to do this click the blue eye icon to view and then click the Sync Now button.
3. The Sequence in which the Import routines should be synchronized are as follows:

* [UOM ](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-uom)
* [TaxClass](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-taxclass)
* [Warehouse](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-warehouse)
* [SalesPerson](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-salesperson)
* [ShipVia](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-shipvia)
* [TermsCode](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-termscode)
* [PaymentType](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-paymenttype)
* [ARDivision](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-ardivision)
* [ShipMethod](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-shipmethod)
* [TaxSchedule](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-taxschedule)
* [ProductFamily ](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-productfamily)
* [Products](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-products)
* [PricebookEntrySTD ](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-pricebookentrystd)
* [PricebookEntry ](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-pricebookentry)
* [Customer ](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-customer)
* [Contact](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-contact)
* [Ship\_to ](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-shipto)
* [DefaultShipTo](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-defaultshipto)
* [Order ](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-order)
* [OrderLines](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-orderslines)
* [ARItemProducts](https://docs.greytrix.com/gumu-salesforce-integration/sage100/setup/default-mappings#sage100-aritemproducts)

4. You can sort the import routines based on Filter and Sync type.

<figure><img src="https://794987320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCRVg-TYx3gVa2Tqtf_%2Fuploads%2FJyi9zYFGBzgiYZMaxUm3%2Fimage.png?alt=media&#x26;token=8a3a0e1d-26c7-41bc-b31e-c687df1a85a9" alt=""><figcaption></figcaption></figure>

### <mark style="color:red;">**Entity Mapping/Import Filter Types**</mark>

<table><thead><tr><th width="234">Filter</th><th>Description</th></tr></thead><tbody><tr><td>All</td><td>This filter will display all the import routines.</td></tr><tr><td>Configuration</td><td>This filter will display regular imports which are designed to synchronize related data necessary for the master data import or creation process.</td></tr><tr><td>Master</td><td>This filter will display importing details about key entities such as Contacts, Customers, and Products.</td></tr><tr><td>Transaction</td><td>This filter will display importing details of financial or business activities.</td></tr></tbody></table>

5. To view the entity you want to import (here we have selected the Entity Customer), under the Action panel click the blue eye icon

<figure><img src="https://794987320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCRVg-TYx3gVa2Tqtf_%2Fuploads%2FxuacSixzmFptx2aZnqnh%2Fimage.png?alt=media&#x26;token=b3a65316-618f-4db7-a3b8-620ac01351cf" alt=""><figcaption></figcaption></figure>

6. A new page will open in the **Header** section consisting of the following fields as mentioned the meeting.

<figure><img src="https://794987320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCRVg-TYx3gVa2Tqtf_%2Fuploads%2FT0sOI33Lk3iGQG0FL6gZ%2Fimage.png?alt=media&#x26;token=0b769f7d-66dd-4f1a-818d-ee5b7c327dfe" alt=""><figcaption></figcaption></figure>

### <mark style="color:red;">**Entity Mapping Fields**</mark>

<table><thead><tr><th width="295">Fields   </th><th>Detail   </th></tr></thead><tbody><tr><td>Entity Mapping Name</td><td>Specify the Name for the Entity import routine.</td></tr><tr><td>Description</td><td>This field will give an overview of the import routine.</td></tr><tr><td>Salesforce Object</td><td>Salesforce Object API name where you want to import your data to.</td></tr><tr><td>Source Entity</td><td>The Sage Entity created where you want to import data from.</td></tr><tr><td>Chain Next</td><td>Specify the next import routine to be run (as per the image above, Contact import will run once Customer has been imported successfully)</td></tr><tr><td>Type</td><td>This is an auto populated field that will display the filter type selected (in the image above the filter type Master was selected)</td></tr><tr><td>Active</td><td>Check to keep the current mapping Active</td></tr><tr><td>Default for promotion</td><td>Checking this checkbox for the import routine it will only be used for promotion, not for importing</td></tr><tr><td>Last Sync Field</td><td><a href="https://www.greytrix.com/blogs/salesforce/2017/10/30/import-data-from-sage-100-erp-to-salesforce-using-last-sync-field-and-value/">Refer to Greytrix Blog</a></td></tr><tr><td>Last Sync Value</td><td><a href="https://www.greytrix.com/blogs/salesforce/2017/10/30/import-data-from-sage-100-erp-to-salesforce-using-last-sync-field-and-value/">Refer to Greytrix Blog</a></td></tr><tr><td>Size</td><td>Specify the size for the records to be fetched from Sage</td></tr></tbody></table>

7. To schedule Import Routines, under the Action panel click on the **green pencil icon** to edit.
8. Click on the **Schedule** button at the top right and a new screen will appear as shown.

<figure><img src="https://794987320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCRVg-TYx3gVa2Tqtf_%2Fuploads%2FRD6k55QT6CQZVGlJ5JYo%2F5.png?alt=media&#x26;token=17789851-e918-472b-86f1-2fc05d83b20c" alt=""><figcaption></figcaption></figure>

9. Set the Next Run **Date & Time** select **Schedule Type** as Hourly/Daily/Weekly/Monthly and click on the **Save** button (you can see the Previous Run Time when the current import routine runs)
10. To skip a schedule for a specific time, use the **Skip Schedule** tab, enter the start time and end time, and click **Save.**

**Export Mapping**

If you want to add the mapping to a different Salesforce Org without creating it manually, you can now **Export** the mapping from one org to another (e.g., Sandbox to Production)

11. Select the entity mapping you want to export and click on the **Export Mapping** button.

<figure><img src="https://794987320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCRVg-TYx3gVa2Tqtf_%2Fuploads%2Fjns7K9fsnKj6In3e2fYb%2Fimage.png?alt=media&#x26;token=a685e38d-70c9-48a9-961a-4ece033b4cbb" alt=""><figcaption></figcaption></figure>

12. The selected Entity Mapping file will download immediately.

<figure><img src="https://794987320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCRVg-TYx3gVa2Tqtf_%2Fuploads%2FCv0ABNSMMy3RQmBInPlK%2Fimage.png?alt=media&#x26;token=ef06e4ef-b833-4065-8ea9-47e1b6aeb882" alt=""><figcaption></figcaption></figure>

13. The next step is to log in to the other Org (Here we are showcasing in the same Org) and navigate to the **Entity Mapping/Import** tab, click the Import Mapping button, then click the Upload File button to upload the file.

<figure><img src="https://794987320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCRVg-TYx3gVa2Tqtf_%2Fuploads%2Fvdge9nPYdnQV2i8wCTGl%2Fimage.png?alt=media&#x26;token=a1e3a7d2-0765-4a66-89ad-133e1689ac2a" alt=""><figcaption></figcaption></figure>

14. After the file uploads, the user needs to click on the “**Import**” button. This will start the internal processing and once done user will be notified with a success message.

<figure><img src="https://794987320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCRVg-TYx3gVa2Tqtf_%2Fuploads%2FhEelOoxl28MMojJMq8qv%2F9.png?alt=media&#x26;token=c536d46d-64bf-4697-9f73-7a76c3b7ffe5" alt=""><figcaption></figcaption></figure>

**Details Tab**

15. Navigate to the **Details** tab and click on the **Mappings** tab, here you can map the Sage fields with Salesforce fields (add additional mappings by clicking on the **Edit** button followed by the **Refresh Fields** button at the top).

<figure><img src="https://794987320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCRVg-TYx3gVa2Tqtf_%2Fuploads%2F4EH1P5sbVQXGS9CQAv23%2Fimage.png?alt=media&#x26;token=5c2f6fc3-361b-436b-9182-df87216e3f2e" alt=""><figcaption></figcaption></figure>

16. Navigate to the **Filter** tab, here you can add a filter to the import routine if you want to import specific data (for example, we have filtered the import routine based on the Customer No 0000010), and click Save.

<figure><img src="https://794987320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCRVg-TYx3gVa2Tqtf_%2Fuploads%2FuRTb7O4twdYVKE4ss8Ap%2Fimage.png?alt=media&#x26;token=46fe1970-6631-4245-b296-d5cc43dc5c2f" alt=""><figcaption></figcaption></figure>

17. Click on the **Preview** button at the top to view the data from Sage, then import by clicking the **Sync Now** button present next to the Preview button.

<figure><img src="https://794987320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCRVg-TYx3gVa2Tqtf_%2Fuploads%2FATSz9Ucmoo13RylRYywr%2Fimage.png?alt=media&#x26;token=3d166a7f-af79-45c2-8252-fc92c4f16864" alt=""><figcaption></figcaption></figure>

17. The **Relationship** tab allows you to specify Parent-Child relationships (for example, Contact will always have a relationship with Account which we can define here).
18. You can set up a Relationship to Sync if the target object has a parent in Salesforce (for example, Account-Contact)
19. To add a relationship, click on the **Add Row** button, and select the Target, Source Field, and Parent Object Name from the list of Salesforce Objects (for example, Account is the Parent Object of the Contact object in Salesforce).
20. &#x20;In the **Logs** tab, you can view the status of the import/sync.

<figure><img src="https://794987320-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCRVg-TYx3gVa2Tqtf_%2Fuploads%2FGtiJEkR5p3H6sX5ZxuIq%2Fimage.png?alt=media&#x26;token=71f31ca7-ddb3-40e7-8023-c6913f30a051" alt=""><figcaption></figcaption></figure>
