Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this Page

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

Insert excerpt
DEPRECATED | Microsoft Dynamics CRM Snap Pack
DEPRECATED | Microsoft Dynamics CRM Snap Pack
nameDynamics CRM SP-Deprecation Note
nopaneltrue

Snap type:Write
Description:

This Snap provides functionality to update an existing record or insert a new record in Microsoft Dynamics CRM based on the input document field values that match the Dynamics CRM object schema field names.

ETL Transformations & Data Flow

This Snap enables the following ETL operations/flows:

  1. Extract data from the upstream Snap containing the data for updating or creating the Dynamics CRM object(s)
  2. Transform the input document into a SnapLogic friendly JSON Document
  3. Load the data into the Dynamics CRM Update Snap to update or create the CRM object(s)

  • Expected upstream Snaps: Mapper Snap
  • Expected downstream Snaps: None

Input & Output

  • InputFields of CRM object to be updated or created. It is optional to provide either the ID of the CRM object or query. If ID or query is provided, then the corresponding record is updated, else new record(s) will be created. The typical configuration is to have an upstream Snap that contains the mandatory fields for updating the existing CRM object. Mapper Snap is a preferred upstream Snap as it populates the input schema for the selected Dynamics CRM Object Type.

  • Output: A document with the result set. If the update is successful, then the output document will contains the Guid of the updated or inserted CRM object.


Prerequisites:None
Limitations and Known Issues:
  • Works in Ultra Task Pipelines.
  • When updating or creating more than one CRM Object in batches, the Batch Size range is from 1 to 1000. This is a limitation by Microsoft Dynamics CRM.


Configurations:

Account and Access

This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Dynamics CRM Account for information on setting up this type of account.

Views

InputThis Snap has exactly one document input view.
OutputThis Snap has exactly one document output view.
ErrorThis Snap has at most one document error view and produces zero or more documents in the view.


Troubleshooting:

For trouble shooting purpose, try performing a similar operation directly on the Dynamics CRM User Interface and collect the necessary data. Compare the data used in the User Interface with the SnapLogic pipelines to see if there are any inconsistencies.

In order to view the Object ID of the Dynamics CRM Object from the User Interface, the recommended approach is to install a browser plug-in. The plug-in will be available in the browser's Developer tools console. Contact your administrator for the preferred plug-in.

Settings

Label

Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

Object type

Required. Microsoft Dynamics CRM Object Type. For example, account.

Default Value: account

Note
titleImp. for adding activity type entity

When configuring activity type entities, such as Task, PhoneCall, Fax, etc., if the parameter regardingobjectid is also being added then map a logical name as well, this can be done by adding the parameter regardingobjectname. If this is not done, the Snap will throw an exception.


IDOptional. Guid of the Dynamics CRM Object. This field is suggestible.
Related object type

Microsoft Dynamics CRM Object Type of the Object to be related to.

Default Value: None

Related object ID

Guid of the related Microsoft Dynamics CRM Object.

Default Value: None

Related object relationship

Relationship Schema between the Microsoft Dynamics Object to be created with the related Object.

Default Value: None

Upsert Multiple ObjectsRequired. When enabled, the Snap updates multiple records per object type if the query returns more than one CRM record
Upsert Query Fields

Optional. Query fields to use to upsert the corresponding CRM records. Click + to add multiple fields.

Default value: None

Example: lastname

Note

The query separates multiple fields with the AND operator. 


Batch size

Number of records processed in each request. Batch size can range from 1 to 1000.

Default Value: 200

Multiexcerpt include macro
nameSnap Execution
pageAnaplan Read


Multiexcerpt include macro
nameSnap_Execution_Introduced
pageAnaplan Read

Basic Use Cases



Expand
titleCRM Upsert using the provided ID

In this pipeline, the Dynamics CRM Update Snap updates the Object type, contact by providing the ID manually.



Expand
titleCRM Upsert using the upsert query from the upstream

In this pipeline, the Dynamics CRM Update Snap updates the Object type, contact by providing the ID manually.





Typical Snap Configurations


The typical Snap configurations are: 

  • Without Expression: Directly passing the required ID to the CRM Upsert Snap.

In this pipeline, the Dynamics CRM Upsert Snap updates the Object type, contact by providing the ID manually.

The Mapper Snaps passes the values to be updated to the object.


  • With Expressions


The below pipeline uses the values passed via the upstream and the pipeline parameters. Here, the Mapper Snap passes the values for the expression using the pipeline parameters. The Dynamics CRM Snap uses the values passed from both, the upstream and the pipeline parameters.

    • Values from an upstream Snap: The Mapper Snap passes the values to be updated for the object.
    •  Pipeline Parameter: Pipeline parameter set to pass the required values for ID and City.  The CRM Upsert Snap uses the value _ID, and the Mapper Snap used the key value _City for the Object type to be updated.

 

 Pipeline parameter set to pass the required values for ID and City.  

  

The expression value for the _City is passed for the target output schema path using the Mapper Snap. Note the _City key value is used from the pipeline parameter values.


The Dynamics CRM Upsert Snap upserts the Object type with ID value using the Pipeline parameters.


The output preview from the pipeline execution:


 


Another Use Case with expression enabled:

Expand
titleCRM Upsert with ID expression enabled

In this pipeline, the Dynamics CRM Upsert Snap updates the CRM Object with list of IDs as provided by the upstream CSV Generator Snap and the fields to be updated via the Mapper Snap.

The IDs as passed by the CSV Generator Snap:


The Mapper Snap provides the field to be updated with the value. Pass through is enabled to pass through the "leadid" variable provided in the upstream Snap, CSV Generator


The Dynamics CRM Snap upserts the Object type, lead with the provided ID as taken from the upstream:


The successful execution of the pipeline displays the below output:

Upsert Multiple Fields

This example demonstrates how multiple fields can be upserted using the Dynamics 365 For Sales Upsert Snap.

Download this Pipeline.

Expand

This Pipeline is composed of three Snaps:

  • JSON Generator: Supplies the necessary account information along with the target fields and their corresponding values as a JSON file.
  • Mapper: Maps the fields in the input with the fields in the account.
  • Dynamics 365 For Sales Upsert: Upserts the fields into the account.

The input contains the fields that are to be upserted $creditonhold, $name, and $address1_city along with the account number ($accountnumber) in which these values are inserted. The output preview of the JSON Generator Snap is as follows:

These values are mapped to the corresponding fields in the Dynamics 365 For Sales account using the Mapper Snap:

The output preview from the Mapper Snap is shown below:

The Dynamics 365 For Sales Upsert Snap is configured to upsert multiple fields ($creditonhold, and $name) as shown below:

Upon successful execution, these fields are upserted into the Dynamics 365 For Sales account as shown in the Snap output preview below:

Download this Pipeline.


Advanced Use Case 


The following describes a pipeline, with a broader business logic involving multiple ETL transformations, that shows how typically in an enterprise environment, the CRM Upsert functionality is used. Download the pipelines from the Downloads lnks below.

This pipeline reads and moves several documents from the Salesforce platform to the Dynamics CRM platform. The validation statistics displays the number of documents moved, in this case. using the CRM insert functionality. Note that 12 documents are read from the Salesforce, mapped and inserted them to the Dynamics CRM instance.  


  1. Extract: The Salesforce Read Snap reads the records form an Object type.  

  2. Transform: The Mapper Snap maps the metadata from the input schema (Salesforce) to the output schema (Dynamics CRM)

  3. Load: The CRM Upsert Snap inserts the records into the required Object. 



Downloads

Multiexcerpt include macro
namedownload_instructions
pageOpenAPI

Attachments
patterns*slp, *zip


Insert excerpt
DEPRECATED | Microsoft Dynamics CRM Snap Pack
DEPRECATED | Microsoft Dynamics CRM Snap Pack
nopaneltrue