We provide our SaaS customers an easy way to manage their own connectors and its actions and endpoints.


Overview


Example of UI Form Schema to display the form


{
  "ui_form_schema": {
    "classicinput": {
      "required": true,
      "title": "input",
      "type": "text"
    },
    "date": {
      "title": "date",
      "type": "date"
    },
    "daterange": {
      "title": "date A and B",
      "type": "daterange"
    },
    "datetime": {
      "required": true,
      "title": "date and time",
      "type": "datetime"
    },
    "email": {
      "placeholder": "E-mail zum bestätigen",
      "title": "Email",
      "type": "email"
    },
    "multiselect": {
      "default": [
        "normal",
        "low"
      ],
      "enum": [
        "urgent",
        "high",
        "normal",
        "low"
      ],
      "allowCreate": true,
      "multiple": true,
      "title": "multi select",
      "type": "select"
    },
    "number": {
      "default": 2,
      "max": 3,
      "min": -1,
      "step": 0.25,
      "title": "Zahl zwischen -1 und 3",
      "type": "number"
    },
    "password": {
      "title": "password",
      "type": "password"
    },
    "singleselect": {
      "default": "problem",
      "enum": [
        "problem",
        "incident",
        "question",
        "task"
      ],
      "title": "single selct",
      "type": "select"
    },
    "switch": {
      "default": true,
      "title": "Aus/An",
      "type": "switch"
    },
    "textarea": {
      "info": "Type some text",
      "maxLength": 20,
      "minLength": 10,
      "placeholder": "Type...",
      "required": true,
      "rows": 3,
      "title": "textarea",
      "type": "text"
    }
  }
}


To allow a user to add manually their own custom options in a select drop down, add the below to:

"type": "select",
"appendableEnum": true


How to include multiple select parameters


Insert all the parameters available in the ui_form-schema, e.g. and add "multiple": true,:

"include": {
    "title": "Details to include",
    "type": "select",
    "multiple": true,
    "enum": [
      "owner",
      "creater",
      "updater",
      "source",
      "contacts",
      "sales_account",
      "deal_stage",
      "deal_type",
      "deal_reason",
      "campaign",
      "deal_payment_status",
      "deal_product",
      "currency",
      "probability",
      "created_at",
      "updated_at"
    ]
  } 


Then insert the include variable into the endpoint with those replace() formulas in order to remove the characters not wanted in the , such as:

…{% if include != [] %}&include={{include |replace("[", "")|replace("]", "")|replace("'", "")|replace(" ", "")}}{%endif%}



Action endpoints and building their query strings dynamically


In order to build query strings dynamically (i.e. not having to take care of when to player a ? vs a &) always use & and our backend will dynamically take care of placing the ? correctly by replacing the first occurrence of & with a ? Note: This is only being done if the query string does not include a ?


Request body examples for dealing with files


Example for getting a file and uploading it to e.g. DropBox, GoogleDrive, etc. as a binary. The key `request_binary_url` is a reserved key and take whatever input it gets and converts it to a binary and sends it as such on a later following request.

 "request_binary_url": {
    "info": "The file can come from a previous step of a dynamic insight flow or from a static location on the web",
    "required": true,
    "rows": 2,
    "title": "File URL where the file is fetched from",
    "type": "text"
  },



Example to make file-pathes look right:

{
{% if mydata.path[0] == "/" %}
    "path": "{{mydata.path}}"
{% else %}
 "path": "/{{mydata.path}}"
{% endif %}

{% if mydata.parent_rev is defined %}
  , "parent_rev": "{{ mydata.parent_rev }}"
{% endif %}
}

Note, mydata. is currently required as a prefix for each variable name. It's best to use if variable is defined always, even for required variables.



In order to allow custom fields where the type may not be known to send data in the right format, i.e. booleans and numbers without quotation marks the following line has to be inserted, instead of "{{item.key}}": "{{item.value}}", when configuring the connector action request body:

"{{ item.key }}": {% if item.type == 'number' %}{{ item.value }}{% elif item.type == 'switch' %}{{ item.value | lower }}{% else %}"{{item.value}}"{% endif %}

The most known use-case for this is for APIs, such as Zendesk or Salesforce, that are popular for using custom fields, added by each user individually.

 


Code Highlighting for SQL, htmlmixed, jinja2, javascript, python


Add code highlighting by making type `code` and adding the mode type to one of these five sql, htmlmixed, jinja2, javascript, python (letters all lower case). Further syntax highlighting can be added upon request as per: Code Highlighting


{
"myField":{ 
   "type":"code",
   "mode":"sql",
   "title":"My Title" 
  }
}


Nested Form Schema

Example image:


Example code:

clickEvent: {
  title: 'Click Event',
  type: 'nested_object',
  children: {
    shouldReactOnClick: {
      title: 'Click on/off',
      type: 'switch',
      info: 'Determinte if click on a value on the chart should open a link.',
      default: false
    },
    urlTemplate: {
      title: 'URL template',
      info: 'Base URL with placeholders (use the SQL columns with doubly curly braces).',
      type: 'text',
      placeholder: 'https://www.google.com/search?q={{category}}'
    },
    test: {
      title: 'Test',
      info: 'test',
      type: 'nested_object',
      children: {
        testChild: {
          title: 'testChild',
          type: 'text'
        },
        testChild2: {
          title: 'testChild2',
          type: 'text'
        },
        test: {
          title: 'Test',
          info: 'test',
          type: 'nested_object',
          children: {
            testChild: {
              title: 'testChild',
              type: 'text'
            },
            testChild2: {
              title: 'testChild2',
              type: 'text'
            },
            test: {
              title: 'Test',
              info: 'test',
              type: 'nested_object',
              children: {
                testChild: {
                  title: 'testChild',
                  type: 'text'
                },
                testChild2: {
                  title: 'testChild2',
                  type: 'text'
                },
                test: {
                  title: 'Test',
                  info: 'test',
                  type: 'nested_object',
                  children: {
                    testChild: {
                      title: 'testChild',
                      type: 'text'
                    },
                    testChild2: {
                      title: 'testChild2',
                      type: 'text'
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
},

Sending emails

Often email providers expect content to be send based64 encoded. Please use the Jinja filter base64_encode (or base64_decode) for this like this:

{{ myEmailContent | base64_encode }}