Dynamic (DDL) inputs

Overview
Copied!

Certain Tray connector operations have to dynamically respond to other information that may be determined by an End User.

For example when using the Trello 'Create new Card' operation in the Tray builder, you must use drop-down lists to select both the Board and List that the new card will be created in:

The following screenshot shows using a Postman-like tool to make a call using the Trello 'Create New Card' operation.

From the input schema retrieved using Get Connector Operations, we know that the list id board and position are all required inputs.

To test this operation you can hardcode these id values, which will result in a successful call:

However the 'Create new card' operation must work in a dynamic fashion, in that an end user must be able to specify the board and list.

This page will talk you through how to identify DDLs and construct your API calls correctly.

Identifying DDLs
Copied!

Having used Get Connector Operations to retrieve a list of e.g. Trello operations, you can identify any dynamic operations by the presence of a 'lookup' field:

In this case we can see that the 'lookup' for the 'board' property is 'get_boards_ddl':

📋
1
{
2
"title": "Board (ID)",
3
"type": "string",
4
"lookup": {
5
"operation": "get_boards_ddl",
6
"input": {}
7
}
8
}

Testing DDLs
Copied!

'get_boards_ddl' is a standalone operation that you can use to list the available boards and allow your end users to select from.

A successful run of the operation will list the available boards:

Likewise 'get_lists_ddl' is a standalone operation that you can use to show the available lists for your end users to select from.

It accepts board id as an input, which will have been retrieved from a previous user interaction with the 'get_boards_ddl':

Putting it all together
Copied!

The following diagram illustrates how you would make use of these calls in an application which allows an end user to:

1. Choose the service (Trello)

2. Choose the operation (Create New Card)

3. Choose the board (Marketing)

4. Choose the list (To do)

5. Add the new card details