In this example, we shall create objects in MS Dynamics 365 for Sales using object IDs retrieved from a CSV file. We shall then delete these objects using the Dynamics 365 for Sales Delete Snap.
We start by uploading object data from a CSV file:
You can see in the screenshot above that we have modified five account numbers (with attribute label 'id') by appending '_test'. These are the test accounts that we shall add to MS Dynamics 365 for Sales. To do so, however, we will need to identify the precise rows of data and then map them to the attribute headers in the target DB.
We use a CSV Parser Snap to reliably interpret the CSV data, and then we use a Head Snap to ensure that we select only the first five rows for insertion into the target DB:
We are now ready to insert the new accounts into the MS Dynamics 365 for Sales DB. We start off by using a Mapper Snap to map the account ID headers in our CSV file to the corresponding headers in the target DB:
We have now mapped the 'id' attribute header in the input CSV data to the 'name' header in the target DB. We can now create the data in MS Dynamics 365 for Sales:
We can see that the new data is drawn from the values in our input file. We can now use the Delete Snap to return the DB to its initial state. To do so, we will need to supply account IDs that need to be deleted, to the Delete Snap. We do this using another Mapper Snap:
Because we are mapping account IDs in the MS Dynamics 365 for Sales to attributes in the same DB, we use the same attributes in both the Expression and Target path fields.
Once the mapping succeeds, we can run the Delete Snap using configurations as shown below:
Download the sample pipeline