Brickworks Jinjava inserts

This article contains a reference of Brickwork inserts which can only be used within the Brickworks feature on the interface.

Retrieving values from fields

  • Insert is allowed in: Jinjava code field type
  • Syntax: {{ record.APIname }}
    APIname must be replaced with the value of the API name option available in the settings of the field on the interface.
  • Description: This insert enables retrieval of values from other fields in a record. Retrieval is limited to fields containing primitive data types: strings, numbers, and booleans
  • Where is the API name value located?:
    API name
    API name in the configuration of the schema field

In the tabs below, you can find the request for the preview of record results and its response.
The request contains two fields:

{
  "identifierValue": "74029569-b01d-5ade-8cc2-6e8f7c136649",
  "context": {},
  "values": {
    "productName": "Sneakers ABC",
    "productId": "The identifier of the {{ record.productName }} is: 123456"
  }
}

Retrieving context

  • Allowed in:
  • Syntax: {{ context.myField }}
    Replace myField with the parameter name whose value will be used as a context.
  • Description: Use the context insert to supply values for non-profile variables. When previewing the record, include the variable name as the key and its corresponding value to properly render the Jinjava field output in the preview.
  • How to provide context for retrieval?

In the tabs below, you can find the request for the preview of record results and its response.
The record contains the following fields:

  • productName which is a string field
  • productId which is a string field
  • productInformation which is a catalog field (Synerise object)
  • product which is an AI recommendation field (Synerise object)

For Synerise object an

{
  "identifierValue": "74029569-b01d-5ade-8cc2-6e8f7c136649",
  "context": {
    "itemId": "0000208295260"
  },
  "values": {
    "productName": "Sneakers",
    "productId": "0000208295260",
    "productInformation": {
      "id": "15988",
      "itemKey": "{{ context.itemId }}"
    },
    "products": {
      "id": "TtZiwYdJQbuR",
      "params": {
        "itemId": "{{ context.itemId }}"
      }
    }
  }
}
😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker