Intellisense

Learn more about Digibee Platform Intellisense

Gabrielly Pereira avatar
Written by Gabrielly Pereira
Updated over a week ago

Digibee's Intellisense displays functions and Globals that you can request directly from the connector form as you create the pipeline. This way, you can fill out your connectors easier and faster.

In this article, we will use the connectors REST V2 and JSON Generator connectors to exemplify Intellisense.

Example

In the REST V2 connector form, you must enter a URL to access a certain endpoint. When you click on the URL field, Intellisense is displayed on the right side of the screen.

In this example, we will use the standard REST V2 endpoint ( https://viacep.com.br/ws/{{ DEFAULT(message.$.cep, "04547-130") }}/json/?), and run the Test mode to test the pipeline and verify its output:

{
"status": 200,
"statusMessage": "OK",
"body": {
"cep": "04547-130",
"logradouro": "Alameda Vicente Pinzon",
"complemento": "",
"bairro": "Vila Olímpia",
"localidade": "São Paulo",
"uf": "SP",
"ibge": "3550308",
"gia": "1004",
"ddd": "11",
"siafi": "7107"
}

In the output of the endpoint, note the fields “cep”, “ddd”, “rua”, “logradouro”, “localidade”, and “uf”. We will use these fields to create a new output for this pipeline using the JSON Generator and the Double Braces REPLACE, TOINT, and CONCAT functions presented by Intellisense.

Note that in the output, the value of the field "cep" is presented with a hyphen (04547-130). To remove this from the pipeline output, we can use the REPLACE function, as shown in the following GIF:

Suppose we need to convert the String value of the field “ddd” into an integer value. In this case, we use the TOINT function:

Suppose I want to display the full address by concatenating “rua”, “logradouro”, “localidade” and “uf” in the pipeline output. Using the CONCAT() function, we can concatenate any messages and words we want.

Note: There is no limit to how many fields we can concatenate using this function. If the field does not exist in the message to be handled, the connector ignores the request.

So, this will be the result of the execution:

{
"cidade": "São Paulo",
"cep": "04547130",
"ddd": 11,
"enderecoCompleto": "Alameda Vicente Pinzon - Vila Olímpia - São Paulo - SP"
}

In addition to the features presented in this article, there are others available in Intellisense. To learn more about them, read the article Double Braces Functions. The resources of this functionality will be added in the next releases of the Platform.

Did this answer your question?