Question about SmartConnect’s Webs Service Connector
I know that we can have SmartConnect gather data from Miscrosoft CRM and dump it into a SQL database (and use some other in-house written application to process that data), because we already do that. Right now I am researching the possibility of having SmartConnect gather data from CRM and use the Web Service Connector to post the data directly to the Zendesk API.
curl -v -u {email_address}:{password} https://{subdomain}.zendesk.com/api/v2/users.json -H "Content-Type: application/json" -X POST -d '{"user": {"name": "Roger Wilco", "email": "roge@example.org"}}'
curl -v -u {email_address}:{password} https://{subdomain}.zendesk.com/api/v2/users/{id}.json -H "Content-Type: application/json" -X PUT -d '{"user": {"name": "Roger Wilco II"}}'
Thanks!
You are correct, SmartConnect is not able to use dynamically generated URL's for the Web Service Data Source or Destination.
However, you can always use a Script Task to accomplish what you are needing to do. You can use a Pre-Map task to call a web service and pull data into a file. You can also use a post document task to send data to a web service using a script task.
Lorren
Hi Lorren,
Thanks for the reply.
Are there any samples (somewhere) of how to use the script task to accomplish this?
Thanks!
Here is a link to a codeproject solution that discusses how you would call the Zendesk API.
http://www.codeproject.com/Tips/782726/Getting-Tickets-Information-from-Zendesk-API
Each script task within smartconnect is really a method and executes at a specific time within the SmartConnect process. The Pre-Map tasks run before SmartConnect even reads the data source.
Here is an example of pulling data from an FTP site in the Pre-Map stage that you could extrapalate to your Zendesk script.
http://blog.eonesolutions.com/2014/06/tech-tuesday-creating-task-in.html
Thanks,
Lorren
Hi Lorren,
Thank you very much for the reply. I will review the links.
Cheers!
The link you provided above for the Tech Tuesday blog post is no longer good… By any chances do you have another example ? I need to figure out how to run a JSON script to query a web API service from Expensify to retrieve a report format and download expense data in order to get them processed by a map in SC 2018 and upload the payable transaction into GP ..
Beat,<br>Here is the new link to the Tech Tuesday article.<br>https://www.eonesolutions.com/tech-tuesday-creating-a-task-in-smartconnect-to-get-a-file-from-an-ftp-site/<br><br>Here is an example of a task that makes a web call to return a JSON output, which can be written to a file if needed.<br>https://www.eonesolutions.com/tech-tuesday-how-to-handle-paging-with-shopify-in-smartconnect/
Not sure what happened to those two blocks. They look fine if you click on "Reply" or "Quote"..