How do I email csv reports, Xml JSON reports?
DSYNC is well known for connecting applications together however did you know that DSYNC can be used to automate email notifications and send data reports and updates.
Common scenarios where the DSYNC email feature is used include:
- Notifying suppliers or retailers of product changes
- Notifying parties when an error occurs
- emailing of reports
- Automating XML reports, or JSON reports
There are many combinations where this handy feature can be used
Let’s get into the product demonstration (XML and JSON reports via email)
In this tutorial we will be setting up an “email notification” that will run at the same time our “Product export” will run. Email notifications can be set up on any jobs that you have set up in your DSYNC dashboard. Notifications can be set up to run “ON error” or “On Success”The trigger for the job will be based on the “History” result. To set up an email notification we will need to add an “Email Endpoint” to our DSYNC dashboard
How to set up email notifications for CSV, XML and JSON reporting?
- In the top right hand corner select “PLUS DESTINATION”
- Select “EMAIL”
- Proceed to add a name for your Email endpoint
- This will add a small “EMAIL icon” to your Dashboard
- By clicking on the email or envelope icon you will be able to enter in a “Message” on the right hand panel For this demonstration, we will type “DSYNC tester message” Underneath the message section there is a section to add in email addresses to be notified. Proceed to enter in who you would like to send the email messages to when the jobs run.
- After each email click add, then proceed to select “SAVE”
- The next step is to make a Data Layout for the job
Create a data layout
- Click on the email envelope and then select “New” for the data layout. Complex data layouts can be added for large notifications however for this demonstration lets add a few fields to the data layout one by one. First lets select “XML”, Then lets add some fields to the data layout by selecting “ADD field” As this is a product feed lets add the field “Product”. Select “Multiple” as the product field should be set as an Array. In the field type select “Object”. For the second field lets add “SKU”.Highlight products – then select Add field In the field settings lets title as SKU then select OK
- Now that we have added two fields to the data layout lets select save.
The next step is to create a link or a relation
You can join email notifications to existing data jobs in this demonstration we can set up the email notification to run every time the RSS data job is set to run.
Click on the first endpoint – then select create a link slash relation then click on the email icon or destination endpoint. Lets create a new map between for the email notification to run. Double click on the line between the endpoint then select New map, Name your Map and now it is time to edit your map. In the earlier step we only added two fields to our data layout therefore this map will be easy to pair.Click to add the field and pair up the SKU field. Perfect this completes the mapping section.
Now that we have set up the email notifications, we have set up a data layout and we have mapped the data we can return to the dashboard to test the notifications.
Testing the eMail notification
Start the data sync: To begin the job – select “RUN”
Check the status: By viewing the “History” section we can see when the job is complete and successful
If successful an email will be sent immediately
As we open the email we can see the message we entered during the set up process
“DSYNC Tester Message”
You will also find attached within the email the customized report file
The file can be in multiple formats including… spreadsheet, XML, JSON or in a variety of formats. The report can be customer data, product data, order data or whatever data extract you have requested DSYNC to send you.
When we open the file we can see the two fields we requested – Product and SKU.
The report is also in the XML format we requested.