

# Mapping ACE objects
<a name="crm-connector-mapping"></a>

The CRM connector provides the **ACE Mappings** page. The page enables you to map objects and fields between your Salesforce organization and AWS Partner Network (APN).

The following sections explain how to create object mappings.

**Topics**
+ [

# Using the ACE Mappings page
](mapping-page.md)
+ [

# Multi-object mapping
](multi-object-mappings.md)
+ [

# Picklist mapping
](picklist-mapping.md)
+ [

## Mapping ACE and Salesforce objects
](#mapping-guidance)
+ [

# Sync logs and reports
](crm-connector-sync-logs-and-reports.md)

# Using the ACE Mappings page
<a name="mapping-page"></a>

AWS Partner Central provides the following ways to navigate to the **ACE Mappings** page: 
+ From the App launcher, search for and choose **AWS Partner CRM connector**.
+ Choose the **ACE Mappings** tab.

  —OR—

  Choose the **Guided setup** tab, and in the **Map leads and opportunities** section, choose **Start** or **Review**. 

On the **ACE Mappings** page, use the left navigation pane to toggle between opportunity and lead mappings. Use the **Object Selector** to choose the source object to map APN leads and opportunities. The object selector supports mapping standard opportunities, lead objects, and custom objects. Use the **Mapping View** and **Type View** filters to toggle among mapped fields, unmapped fields, required fields, and optional fields. 

On the **ACE Mappings** page, the **AWS Fields** column for the object indicates the corresponding target APN fields. The **Salesforce Fields** are source fields of the selected object in the partner’s organization. **Salesforce Fields** are filtered to show only applicable data types available in the organization to be mapped to the corresponding APN field. For example, a text field in APN can be mapped only to a text (string) field in the partner’s organization.

Partners can control inbound updates on mapped fields if they don’t want a field updated by APN. To do this, set the **Enable Inbound Updates** toggle to **False**.

For one-to-one mapping, select the relevant source field, and then choose **Save**.

# Multi-object mapping
<a name="multi-object-mappings"></a>

Multi-object mapping allows partners to map AWS fields to a primary source object, such as an opportunity or lead, and to the Salesforce objects related to the primary source.

**Note**  
Remember the following when using multi-object mapping:  
When using the Salesforce `Account` object for multi-object-mapping with an opportunity object, you must configure the `Default Account` in the [ACE custom settings](guided-setup-apis.md#api-sys-config-settings) to receive opportunities.
When receiving an opportunity, if you map to an object other than the chosen `Opportunity` object, you must ensure that you link the related object to your opportunity record.  
For example, when receiving an AWS referral for the first time, the inserted opportunity has no mapped objects' related IDs *unless* you configure the `Default Account` in the ACE custom settings. If you configure the default account, the referral has the IDs of the chosen opportunity or account objects. Otherwise, the mapped field value won't be inserted. In that case, you must modify the opportunity to add the related object ID, and choose **Sync with AWS**. When AWS pushes the opportunity back to Salesforce, the mapped object’s field updates because it has a reference to the object's related ID.
Select the **Clone Default Account** option in custom settings. This allows AWS to clone the default account when necessary, particularly if you map account fields to your primary object.

**To map related objects**

1. In Salesforce, navigate to the **ACE Mappings** tab and choose an opportunity or lead.

1. From the **Object** selector, choose your source object.

   The **Salesforce Fields** column appears and displays the **>** symbol at the end of any fields that contain related objects.

1. Select an **>** symbol to expand the list of related objects for that field.

1. Choose the field that you want to map to the AWS field.

1. Choose **Save**.

# Picklist mapping
<a name="picklist-mapping"></a>

The picklist dialog box allows limited and extended mappings between the partner’s picklist field and APN. The **ACE Mappings** page also has an Auto Map function if using the provided **custom ACE opportunity object **. For more information about the object, refer to [Using a standard Salesforce object or custom object](crm-connector-mapping.md#custom-ace-opportunity-object) later in this guide.

If an exact match is found between the partner’s field values and APN, those values are mapped automatically. The option for extended mapping lets partners map a single APN value to multiple sources, configure additional target mappings, and set default mappings.

## Limited mapping
<a name="limited-mapping"></a>

1. On the **ACE Mappings** page, select a source field, and then choose **Map Values**. 

   The mapping dialog box appears.

1. For **Step 1: Primary APN Values**, choose either **Auto Map** or the Salesforce value for the corresponding ACE pipeline manager, and then choose **Save**.

1. Repeat steps 1 and 2 as necessary to map all of your ACE pipeline manager values.

1. To close the mapping dialog box, choose **Close**. 

Partners receive a confirmation message that the value mappings were saved. 

## Extended mapping
<a name="extended-mapping"></a>

1. If the same source value maps to multiple APN values, proceed with the mapping as previously described.

1. On the **Primary APN Values** tab, choose the same value mapping for multiple APN values. 

1. If unmapped values exist in the partner’s organization, the **Additional APN Value** tab lets you map additional values to APN. This helps partners ensure that all applicable values in their organization are mapped to appropriate APN values. 

1. If a single value in the partner’s organization is mapped to more than one APN value, use the **Secondary APN Values** tab to set the default value for outbound integrations. 

## Mapping ACE and Salesforce objects
<a name="mapping-guidance"></a>

The following sections explain how to map ACE and Salesforce custom objects in object maps.

### Using an AWS ACE opportunity custom object
<a name="ace-opportunity-custom-object"></a>

Version 2.0 and later of the CRM connector includes an ACE custom opportunity object. You can use the object to manage AWS opportunities in Salesforce.

When using the custom object on the **ACE Mappings** page, partners can automatically map AWS fields to Salesforce fields. Additionally, the custom opportunity object is aligned with the new ACE data model and has validations built in to the user interface that help users submit new opportunities.

To use a custom ACE opportunity object, complete the following steps:

1. In Salesforce, navigate to the **ACE Mappings** page, and choose **Opportunity** from the left navigation pane.

1. Under **Object Selector**, choose **ACE Opportunity **.

1. To map Salesforce fields to AWS fields, choose the **Auto Map ACE object** button.

### Using a standard Salesforce object or custom object
<a name="custom-ace-opportunity-object"></a>

Partners can use the Salesforce standard opportunity object or their own custom opportunity object. To avoid ACE synchronization failures, ensure that the custom opportunity object contains all of the relevant ACE mandatory fields or conditionally mandatory fields. The data type of the mapped AWS field must be the same data type as the Salesforce field created in the custom object. If the data type doesn't match, the field will not appear in the ACE mapping screen. For example, the text field **customerCompanyName** can be mapped only to a text (string) field in the standard or custom opportunity object. For required data types, refer to the ACE opportunity fields.

To use a standard Salesforce object or custom object, complete the following steps:

1. Navigate to the **ACE Mappings** page, and choose **Opportunity** from the left navigation pane.

1. Under **Object Selector**, choose your object.

1. Complete the mapping by selecting the required Salesforce fields against the corresponding AWS fields, and then choose **Save**.

**Note**  
The Auto Map feature is available only for ACE opportunity custom objects.

# Sync logs and reports
<a name="crm-connector-sync-logs-and-reports"></a>

The following topics explain how to use sync logs and reports in the AWS Partner CRM connector app. The topics also list the log and report types, and the data they contain.

**Topics**
+ [

## Sync logs
](#sync-logs)
+ [

## Reports
](#reports)

## Sync logs
<a name="sync-logs"></a>

In the connector app, the **Sync Log** tab displays the status of the synchronization records for inbound and outbound APN synchronization. You use the tab to verify a successful sync and troubleshoot sync errors.

Use the included list views to toggle between **Inbound** and **Outbound** synchronization logs.
+ **Inbound Orchestration** – Indicates the job that checks for available inbound records from APN.
+ **Inbound Orchestration Record Retrieval** – Indicates the job that picks up and processes pending inbound records from APN.
+ **Outbound Orchestration** – Indicates the job that sends pending outbound transactions from your organization to APN.

The **Sync Log** record page shows the status of the synchronization job, the number of records in the payload, the number of records processed successfully, and the number of records in error.

The related **Sync Log** details show the individual record details processed as part of the synchronization job, plus their individual statuses. The following tables explain each type of log file and their related contents.

### Log types
<a name="log-types"></a>


| **Purpose** | **Definition** | 
| --- | --- | 
| Outbound File Retrieval  | Created when the outbound job runs based on frequency and whether a new set of pending records must be synced with AWS. Logs are created only when records must match the following filter specification for the outbound sync: `Updates for AWS` is `true` and `Last Sync Date` is null, or `Last Sync Date` is before the `Last Modified Date` and `Last Modified By` is the user who scheduled the sync jobs. | 
| Inbound File Retrieval  | Created based on your inbound sync schedule. The log lists the callouts that check for pending inbound transactions from AWS.  | 
| Inbound Record Retrieval  | Created only when the parent Inbound File Retrieval job identifies pending inbound transactions from AWS. The log contains the details of the file from AWS that contains the opportunity or lead records. | 

### Outbound file retrieval results
<a name="outbound-file-retrieval-results"></a>


| **Direction**  | **Purpose**  | **Status**  | **Definition**  | 
| --- | --- | --- | --- | 
| From AWS  | Inbound file retrieval | API Success  | A list call to the bucket succeeded, The call checked for pending inbound records that must be processed. | 
| From AWS  | Inbound file retrieval | Error  | The list call failed, typically due to invalid credentials or a permission issue. | 

### Inbound file retrieval results
<a name="inbound-file-retrieval-results"></a>


| **Direction**  | **Purpose**  | **Status**  | **Definition**  | 
| --- | --- | --- | --- | 
| From AWS  | Inbound record retrieval  | API success  | A get call was made to retrieve the file listed from the Inbound File Retrieval operation, if one or more files exist and await processing. | 
| From AWS  | Inbound record retrieval | Partial  | The file was retrieved but processing failed for some records. Review the sync log to troubleshoot the failure. | 
| From AWS  | Inbound record retrieval | Error  |  Processing failed for all records due to one of the following reasons: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/partner-central/latest/crm/crm-connector-sync-logs-and-reports.html)  | 
| From AWS  | Inbound record retrieval | API success  | If one or more files are present and awaiting processing, a get call is made to retrieve the file listed from the Inbound File Retrieval operation. | 
| From AWS  | Inbound record retrieval | Partial  | The file was retrieved but processing failed for some of the records. Review the sync log to troubleshoot the failure.  | 
| From AWS  | Inbound record retrieval  | Error  | Processing failed for all records due to one of the following reasons: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/partner-central/latest/crm/crm-connector-sync-logs-and-reports.html)  | 
| From AWS  | Inbound record retrieval  | Processed  | Processing succeeded and the records inserted into your mapped object. | 

## Reports
<a name="reports"></a>

The AWS Partner CRM connector package includes reports that allow you to track the status of the synchronization between your organization and APN.<a name="view-reports-synchronization"></a>

**To view reports for synchronization**

1. In the AWS Partner CRM connector app, choose the **Reports** tab.

1. Choose **All Folders**, then **AWS Partner CRM connector**.

Available reports include the following:
+ **Inbound Sync Logs** – `Error: Inbound` synchronization record failures by day.
+ **Inbound Sync Logs** – `Success: Inbound` synchronization record successes by day.
+ **Outbound Sync Logs** – `Error: Outbound` synchronization record failures by day.
+ **Outbound Sync Logs** – `Success: Outbound` synchronization record successes by day.
+ **Synchronization Summary** – Summary of inbound and outbound synchronization jobs by day.