Call URL

You can call third-party websites to retrieve the data you need for your database, such as currency exchange rates, company logos, cities, and addresses. In this case, the "Call URL" workflow action can be added to a trigger or custom button.

The "Example: Call URL" database demonstrates the functionality of "Call URL" with Text, JSON, and XML response parsing. To see how it works, you can request a free trial of the "Example: Call URL" database.

To create this type of action select the corresponding option on the workflow action type selecting form.

General Properties

General Properties

Enter the name of the action.
Holds any comments you need for this action.
Execute Triggers
TeamDesk allows cascading execution of record change triggers. It is controlled via the Execute Triggers option of the action. If the action should activate other record change triggers, choose the Yes option; otherwise, the No option is selected.



Choose one of the following options:

Request Properties

Request Properties

The following HTTP calls are available:
Enter the external URL that should be called. Use <% %> code blocks to provide parameters.
HTTP headers consist of name: value pairs, each pair is placed on a separate line. As each header type requires a value in its format, we do not expect much use for database content. Nevertheless, headers behave like query strings. Read more…
This field is visible when the method selected is POST, PUT, PATCH, or DELETE. You may interpret the Body as:

Response Properties

Response Properties

Upon request, the service can either return a failure code (this will be added to a log, and further processing will be stopped) or report OK and provide an error message in the response.

The following options are available:

In most cases, the Auto-Detect option works fine. Yet, if a server reports a wrong format, you may force response interpretation as one of the available formats.

On Error
This option controls the behavior when TeamDesk evaluates response status.

The quick recap on Call URL logic:

If set On Error to Stop Execution, the system roll back all changes and display a generic message.

If you need greater flexibility, set On Error to Continue Execution. Step 2 will be skipped. The Error Message formula, if set, handles both successful and error responses. The formula has a chance to evaluate response status using the ResponseStatus function. Then it can extract a specific error message from the server’s response and abort execution if needed or return null to suppress error and continue execution.

If execution is not aborted, you can use assignments to flag whether the record was successfully processed or not. For example:

If(ResponseStatus() = 200, "OK", "FAILED!") // to Status

Error Message
An Error Formula can be entered in this field. This formula can extract an error message from the response or return null if the response is OK.

Adding Assignments


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

To deal with the data returned by the server, there is a new Response function that takes three forms:

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

Action assignment

Moreover, below the action form, you can find the Log keeping the detailed info regarding the last 100 calls of the action.