On this Page
Overview
This Snap calls the MS Dynamics 365 For Sales REST WebAPI endpoint using the incoming data and writes out a JSON response.
ETL Transformations & Data Flow
This Snap enables the following ETL operations or flows:
- Extract data from the upstream Snap containing the data for performing the provided action on the MS Dynamics 365 For Sales object(s).
- Transform the input document into a SnapLogic-friendly JSON Document.
- Load the data into the Dynamics 365 For Sales Execute Snap to perform the operation on the MS Dynamics 365 For Sales object(s).
Input & Output
Expected upstream Snaps: Any Snap, such as a Mapper or JSON Generator Snap, that offers a document as output.
Expected downstream Snaps: None.
Expected Input: The mandatory fields required for executing the concerned operation on the MS Dynamics 365 For Sales object(s).
- Expected Output: A document with the result set. If the operation is successful, then the output document will contain the information on the MS Dynamics 365 For Sales object(s) being operated.
Prerequisites
You must have a Dynamics 365 OAuth2 for Online account, data to query, and access to the objects concerned.
Configuring Accounts
This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Configuring Dynamics 365 for Sales Accounts for information on setting up this type of account.
Configuring Views
Input | This Snap has exactly one document input view. |
---|---|
Output | This Snap has exactly one document output view. |
Error | This Snap has at most one document error view. |
Troubleshooting
To check whether an operation has completed as expected, perform the same operation directly on the user interface or by sending the appropriate JSON request to the MS Dynamics 365 For Sales WebAPI endpoint. Use Postman (version 6.0.10 minimum) and collect the necessary data. To see if there are any inconsistencies, compare the data used in the user interface or Soap UI with the SnapLogic pipelines.
Support
- Works in Ultra Task Pipelines.
Known Issues
- The Execute Snap currently does not fetch schema. Currently, the user is expected to completely craft the upstream request body.
Snap Settings
Label | Required. The name for the Snap. Modify this to be more specific, especially if there are more than one of the same Snap in the pipeline. | |||||
---|---|---|---|---|---|---|
Dynamics Organization URL | Required. The URL for the MS Dynamics 365 For Sales WebAPI endpoint. Although the URL is editable, query parameters should not be placed within the URL, as that will not work with the supporting libraries. The Query Parameter fields must be explicitly-used query parameter values, such as search filters, etc. This field is suggestible, and shows the user's currently configured Account URL. The REST resource, etc. can be then crafted onto the resulting URL. Example: https://abcxyzcompany.api.crm.dynamics.com/api/data/v8.2/ Example: https://abcxyzcompany.api.crm.dynamics.com/api/data/v8.2/accounts(GUID) (For example, in a GET request of a specific account) Default value: https://<organization>/api/data/<version>/<api> | |||||
Object type | Enables you to specify the MS Dynamics 365 for Sales object type to allow its schema to be fetched by the Snap. Custom object types are currently not supported. Default value: account | |||||
HTTP Method | Required. The HTTP REST Method that will be used in the request. Example: GET, POST, PUT, PATCH, DELETE Default value: GET | |||||
HTTP Request Body | The request body can be directly input into this field for write actions, such as POST or PATCH; however, this field is not required for actions such as GET or DELETE. If the request body is input directly into this field, it must be in the form of a JSON String. Note that the double quotes in the String need to be "Java escaped". Typically the request body will be provided by an upstream Snap such as a Mapper Snap or JSON Generator Snap. Therefore, the field is defaulted to being expression enabled, and the expression is set to "$" which represents the JSON body provided by the upstream Snap. Example: Default value: $ | |||||
Query Parameters | Use the Query Parameters field-set to define search query parameters and their values. The query parameters will be attached to the URL using the HTTP query parameter syntax, separated by '&' and added as key=value. | |||||
HTTP header | Additional HTTP headers to pass when sending requests to the Dynamics 365 for Sales instance. Example:
Default value: No default value | |||||
Parameter | Enter here the attribute that would be used as a key in your query. Example: $filter: A value of $filter is typically used as part of a GET request. For example, the user may want to GET Account objects where a given filter condition exists. Microsoft Dynamics 365 provides a number of special functions that accept parameters, return Boolean values, and can be used as filter criteria in a query. For a list of these functions, see Microsoft Web API Query Function Reference The following is an example of the Between Function searching for accounts with a number of employees between 5 and 2000: | |||||
Value | Specify the value associated with the parameter chosen in the Parameter field in the Query Parameters field-set. For example, if the Parameter was $filter, the value could be '"name eq 'Microsoft' or 'revenue gt 100' or "address1_fax eq '1234567'". When specifying a value that is a string (name or address1_fax), the value must be encased in single quotes. If the value is truly a number, as in the example: 'revenue gt 100', the value must not be encased in single quotes. Microsoft has provided the following documentation on the filtering functionality: | |||||
Snap execution | Select one of the three modes in which the Snap executes. Available options are:
|
Examples
Using Dynamics 365 for Sales Execute as a Standalone Snap
Basic use case: Retrieving an organization's account information
Using Upstream Snaps with the Execute Snap
Basic Use Case: Creating an account using the Execute Snap
Advanced Use Case: Querying an account using query parameters within the Execute Snap
Downloads