Resources

Type of dynamic fields

There are two main type of dynamic fields for the resource catalogs:

Local properties

Local properties are those properties that directly belong to an application; these fields are:

  • id

  • name

  • provider

  • providerResourceKey

  • providerResourceType

  • providerAccountId

  • location

  • deepLinkUrl

  • createdBy

You can use these dynamic fields like the one below, This will be compiled into the following form in the run action popup:

[
  {
    "type": "text",
    "title": "Resource id",
    "payloadName": "res_id",
    "defaultValue": "{{resource.id}}"
  },
  {
    "type": "text",
    "title": "Resource name",
    "payloadName": "res_name",
    "defaultValue": "{{resource.name}}"
  },
  {
    "type": "text",
    "title": "Resource provider",
    "payloadName": "res_provider",
    "defaultValue": "{{resource.provider}}"
  },
  {
    "type": "text",
    "title": "Resource provider resource key",
    "payloadName": "res_providerResourceKey",
    "defaultValue": "{{resource.providerResourceKey}}"
  },
  {
    "type": "text",
    "title": "Resource provider resource tyoe",
    "payloadName": "res_providerResourceType",
    "defaultValue": "{{resource.providerResourceType}}"
  },
  {
    "type": "text",
    "title": "Resource provider account ID",
    "payloadName": "res_providerAccountId",
    "defaultValue": "{{resource.providerAccountId}}"
  },
  {
    "type": "text",
    "title": "Resource location",
    "payloadName": "res_location",
    "defaultValue": "{{resource.location}}"
  },
  {
    "type": "text",
    "title": "Resource deep link url",
    "payloadName": "res_deepLinkUrl",
    "defaultValue": "{{resource.deepLinkUrl}}"
  },
  {
    "type": "text",
    "title": "Resource created by",
    "payloadName": "res_createdBy",
    "defaultValue": "{{resource.createdBy}}"
  }
]

Meta tags are the only local field that can be used in dropdown dataset fields if you want to use one specific metatag value as a default value in text fields.

So if you have some meta tags in your resource, as shown below, It will be rendered as a drop-down with those meta tags. You must use the text version to use meta tags in the webhook headers payload.

Relation properties

Relation properties load up other catalogs related to the chosen one, and you can get access to those fields as well.

Services

You can load up services connected to a resource using this syntax for getting a list of application services, to be shown as a drop-down. Using this type of syntax will result in the following drop-down on the run action popup:

[
// ... other user inputs
   {
    "type": "dropdown",
    "title": "Resource service",
    "payloadName": "res_service",
    "dataset": {
      "data": "{{resource.services()}}",
      "label": "name",
      "value": "id"
    }
  }
// ... other user inputs
]

This will only bring up to 50 first services for the resource.

It is also possible to use one specific service for a text field and use a supported resource.services fields:

  • id

  • name

  • createdBy

  • metaTags

For example, the code below will be rendered to this in the run popup form:

Example user inputs
[
  {
    "type": "text",
    "title": "Resource service ID",
    "payloadName": "res_service_id",
    "defaultValue": "{{resource.services('6a9dc87a-82e5-46a1-a01a-37545e477c67').id}}"
  },
  {
    "type": "text",
    "title": "Resource service name",
    "payloadName": "res_service_name",
    "defaultValue": "{{resource.services('6a9dc87a-82e5-46a1-a01a-37545e477c67').name}}"
  },
  {
    "type": "text",
    "title": "Resource service created by",
    "payloadName": "res_service_createdBy",
    "defaultValue": "{{resource.services('6a9dc87a-82e5-46a1-a01a-37545e477c67').createdBy}}"
  },
  {
    "type": "dropdown",
    "title": "Resource service metatags",
    "payloadName": "res_service_metaTags",
    "dataset": {
      "data": "{{resource.services('6a9dc87a-82e5-46a1-a01a-37545e477c67').metaTags()}}",
      "label": "name",
      "value": "value"
    }
  }
]

Just so you know, if the value in your service is null, it will be replaced with an empty string.

Children & Relatives

Resources have two other relations that can be used with these syntaxes:

{{resource.children()}} // Only for dropdowns
{{resource.children('ID').id}} // or any other available field from below
{{resource.relatives()}} // Only for dropdowns
{{resource.relatives('ID').id}} // or any other available field from below

Available fields for both children and relatives are:

  • id

  • name

  • createdBy

  • metaTags

[
  {
    "type": "dropdown",
    "title": "Resource children",
    "payloadName": "res_children",
    "dataset": {
      "data": "{{resource.children()}}",
      "label": "name",
      "value": "id"
    }
  },
  {
    "type": "dropdown",
    "title": "Resource relatives",
    "payloadName": "res_relatives",
    "dataset": {
      "data": "{{resource.relatives()}}",
      "label": "name",
      "value": "id"
    }
  }
]

This will only bring up to 50 first services for the resource.

It is also possible to use one specific child or relatives for a text field and use supported resource.children or resource.relatives fields:

  • id

  • name

  • createdBy

  • metaTags

Example user inputs
[
  {
    "type": "text",
    "title": "Resource children id",
    "payloadName": "res_children_id",
    "defaultValue": "{{resource.children('d293d57c-79c7-49ef-89d2-59b47c83859c').id}}"
  },
  {
    "type": "text",
    "title": "Resource children name",
    "payloadName": "res_children_name",
    "defaultValue": "{{resource.children('d293d57c-79c7-49ef-89d2-59b47c83859c').name}}"
  },
  {
    "type": "text",
    "title": "Resource children created by",
    "payloadName": "res_children_createdBy",
    "defaultValue": "{{resource.children('d293d57c-79c7-49ef-89d2-59b47c83859c').createdBy}}"
  },
  {
    "type": "dropdown",
    "title": "Resource children meta tag",
    "payloadName": "res_children_metaTag",
    "dataset": {
      "data": "{{resource.children('d293d57c-79c7-49ef-89d2-59b47c83859c').metaTags()}}",
      "label": "name",
      "value": "value"
    }
  },
  {
    "type": "text",
    "title": "Resource relatives id",
    "payloadName": "res_relatives_id",
    "defaultValue": "{{resource.relatives('4013542c-8602-4690-8e92-092c6bb684f3').id}}"
  },
  {
    "type": "text",
    "title": "Resource relatives name",
    "payloadName": "res_relatives_name",
    "defaultValue": "{{resource.relatives('4013542c-8602-4690-8e92-092c6bb684f3').name}}"
  },
  {
    "type": "text",
    "title": "Resource relatives created by",
    "payloadName": "res_relatives_createdBy",
    "defaultValue": "{{resource.relatives('4013542c-8602-4690-8e92-092c6bb684f3').createdBy}}"
  },
  {
    "type": "dropdown",
    "title": "Resource relatives meta tag",
    "payloadName": "res_relatives_metaTag",
    "dataset": {
      "data": "{{resource.relatives('4013542c-8602-4690-8e92-092c6bb684f3').metaTags()}}",
      "label": "name",
      "value": "value"
    }
  }
]

Last updated

Copyright © 2023 configure8, Inc. All rights reserved.