Don't get lost: IMan Guides » Sage CRM User Guide » Sage CRM Connector

Sage CRM Connector

The connector allows you to import data into SageCRM. A full discussion for setting up connectors is found in the User Guide, this section deals with only SageCRM Connector specifics.

Some key features provided by the SageCRM Connector:

  • Custom Entity and Field support.
  • Dynamic querying of metadata, allowing you to import data into any entity.
  • Deep support for multi-level hierarchical data import into SageCRM.

Options Tab

Import Type

Only the entities with ‘Allow Webservices’ flag set to true (as per those described in the setup/configuration section) will be displayed in the list.

The SageCRM Connector allows you to import data with the hierarchical relationship intact. This field denotes the top level entity you wish to import.

Example

Import Quotes with their Items, or Opportunities with Quotes and their Items.

Update Operation

Select the Update Operation to control if how to insert and update records.

The insert/update process is determined by the entity’s ID field:

An existing record will be updated when the ID field is populated and where there is a matching record within the CRM database.

A new record will be inserted when the field is either: not set or mapped or; empty/blank or; is set to ‘0’.

Field Mapping

This section describes the techniques that should be employed when importing data into SageCRM.

Mapping Reference Fields

In order to map reference fields i.e. fields which reference the value of another record the ID of the referenced record should be set.

The screenshot below illustrates two reference fields that are mapped in the SageCRM Connector:

To obtain the id field of a corresponding record use the SageCRMLookup, SageCRMLookupCustomWhere, or SageCRMLookupReturnMultipleValues functions in a map transform in before importing.

Example

In the lookup function examples below, substitute the first function argument with the id of your system connector; full discussion of the various CRM lookup functions are found in Appendix A of the User Guide.

Quoteitems.productid – Set to the productId field of the corresponding record in the NewProducts table.

The following lookup searches using the code field of the product.

SageCRMLookup(“CRM”, “NewProduct”, “prod_productid”, “prod_code”, %productcode, true)

Leads.AssignedUserId – Set to userId field of the corresponding record in the User table.

The following lookup searches for the user record using the first and last name fields.

SageCRMLookup(“CRM”, “User”, “user_userid”, Array(“user_firstname”, “user_lastname”), Array(%firstname, %lastname), true)

Case.CompanyId – Set to the companyId field of the corresponding record in the User table.

The following lookup searches for the company record using the company name field.

SageCRMLookup(“CRM”, “Company”, “comp_companyid”, “comp_name”, %companyname, true)

Mapping Between Nested Entities

When importing multi-level data (such as Opportunity/Quote/QuoteItems), the parent-child reference between of the records is set automatically by the connector. In this scenario, the reference between Quote and Opportunity and QuoteItems to Quote is set automatically.

The parent-child reference uses specific logic, including generation of linking records for:

  • Communications
  • Email
  • Notes
  • Orders & Order Items
  • Phone
  • Quotes & Quote Items
  • Solution

All other entities, including custom ones, the child is linked by finding the parent transaction’s id field. The parent field’s name is stripped of the entity prefix and is combined with the child entity prefix; the result becomes the field name used to update child with the parent’s id value.

DropDown & Pick List Fields

Pick list fields must be set using the code value of the pick list item.

The SageCRMTranslateDropDownValue function can be used to translate from the description of a drop down field to the underlying code value.

Example

Translate from the Proposal Submitted value of the stage field in an opportunity record to its underlying value.

SageCRMTranslateDropDownValue("CRM", "Opportunity", "oppo_stage", "Proposal Submitted", true)