Skip to content
+1-888-319-3663

EONE BLOG

Tech Tuesday: Using Variables in a Web Service Action Endpoint


Many web services require the use of a path parameter to complete a request. For example, the Teamwork Add Time Entry endpoint requires a project id to be able to add time an invoice: base_url/invoices/{id}/lineitems.json. If we entered the project id path parameter directly in the url, the endpoint will only work for one project. SmartConnect can dynamically switch out this value with values from a data source using a rest variable.

Setting up the process

I’m going to assume you already have a web service setup and working. The next step is to add a Variable from the Rest Service Maintenance page.



Next, we add the variable in place of the path parameter on the Service Action endpoint. Variables are enclosed in double square brackets.



The last step is to set the variable to be mappable so it can be replaced with mapped values from our data source.



Now, when setting up an integration process using this Service Action, you will have a mappable variable shown in red because the path parameter is a required value. This will replace the path parameter with any values you have in your source data.



This is powerful if you need to dynamically change out a path parameter for a value coming from your source data. Next time we will take it a bit further and incorporate the use of global variables in service entities and actions.

If you have any more questions, please reach out to us at sales@eonesolutions.com

Leave a Comment





RECENT POSTS


eOne at Summit North America 2021
Employee Spotlight: Megan Tripp, Business Development Representative
eOne is now compatible with Microsoft Dynamics GP October 2021 Release
October 2021 Releases of Extender, SmartList Builder, SmartView, SmartPost, and Flexicoder are Now Available
Advanced SmartConnect REST Web Services Integration - October 2021

POPULAR POSTS


2016 SmartConnect Integration Bootcamps
Tech Tues: Automatically refreshing Pivot Tables in Excel Refreshable Reports
Happy Thanksgiving from the eOne team!
2017 SmartConnect Integration Bootcamps
New Releases of Extender and SmartList Builder

CATEGORIES

TAGS

Business Central CRM D365 Business Central Dynamics 365 dynamics crm Dynamics GP Dynamics NAV Econnect Employee Spotlight eone eOne News error Error Message Events Excel Excel Report Builder Extender Flexicoder GP integration Map Meet the Team Microsoft dynamics crm Microsoft Dynamics GP Navigation List Builder Office Relationships partners Popdock release Reporting SalesForce SalesForce.com SmartConnect SmartConnect.com SmartConnect Bootcamp SmartConnect Maps SmartConnect Office Hours SmartList SmartList Builder SmartPost SmartView SQL Tech Tuesday Templates training

Integrate & Automate without Any Code.

SmartList Data has Never Been Faster.

The Easiest Way to Report on GP Data.