Call URL

You can call to the third party websites to use data your need in a database, for example, currency exchange rates, companies’ logos, cities and addresses, etc. In this case the Call URL workflow action can be added to the trigger or custom button.

The “Example: Call URL” database demonstrates the "Call Url" functionality with Text, JSON and XML response parsing. To check how it works, just order a free trial of the “Example: Call URL” database.

The Call URL workflow action performs HTTP GET requests (support for POST and more advanced options is planned for the next stage) and understands responses in plain text, XML and JSON formats. To create this type of action:

Select a corresponding option on the workflow action type selecting form.

Beside the general purpose Name and Description fields the action has the Url field. Also you should use <% %> code blocks to provide parameters.
Upon request the service can either return a failure code [this will be added in a log and further processing will be stopped] or report OK and provide an error message in the response. To help dealing with such situation there is the Error Formula field - you can extract error message from the response or return NULL if response is OK.
To deal with the data returned by the server there is a new Response() function that takes three forms:
Response() with no arguments returns the "raw" content of the server response - you can use it if the server provides the result in a plain text format.
Response("text") - extracts named data from the response in the XML or JSON format. In case of XML the text should be a valid XPath expression, in case of JSON it's a string in form of "property.property[index].property". The function returns the value as text.
Response("text", Type) - performs as previous one but also tries to convert the result to TeamDesk-specific type.
You can use calls to Response() in both error formulas and assignments.

Name

In the Name field enter the name of the action.

Description

In the Description field enter the Call URL action description if needed.

Url

In the Url field enter the external url that should be called. Use <% %> code blocks to provide parameters.

Format

In most cases Auto-Detect option works fine. Yet if a server reports a wrong format, you may force response interpretation as Text, XML or JSON using this option.

Error Message

In the Error Message field an Error Formula can be entered. This formula can extract an error message from the response or return NULL if the response is OK.

Once the action is created, the Assignment can be added to it:

Use the following form to create the assignment for extracting the value from the third party website and updating this value in the column:

From

In the From field enter the formula extracting the value from the third party website. This value will be later on inserted into a predefined record field.

To

In the To list select the field (column) to which the formula calculated value should be inserted.

Next: Mobile Device Record Create