Integration Fields with Slice Machine

Integration Fields with Slice Machine has been a highly requested feature request.

We are still working on making this option available in the Slice Machine Interface, but that doesn't mean you can't use them already.

Here's the temporary solution to add Integration fields to your documents:

  1. First, ensure Integration Fields are enabled in your repository. If you don't have it, reach out to us so that we can activate it for you. Then add your catalog.
  2. Open your project in your favorite code editor. Run Slice Machine
  3. Open the Custom Type where you want to add the Integration Field and add a Group field.

At the moment, integration fields can only be added as top-level fields, not inside Slices.

  1. Open your project code and find the index.json of the Custom Type you just edited. Find this file in the customtypes > name_of_your_custom_type > index.json.
  2. Find the Group field and add the following structure inside fields: {}:
"api_id": {
   "type": "IntegrationFields",
   "config": {
      "catalog": "my-repository--store",
       "label": "Here goes the field name",
      "placeholder": "This is the field placeholder..."
  1. Add a new name for the api_id of the field and modify the catalog value to match repository settings. For example, if your repository is called lorem and your Integration catalog is called my store, the value will be: "catalog": "lorem--my-store".

  2. Save your JSON file, and you're done. Now you can visualize and use your integration field in the documents!

I've been testing this, and it seems that the naming convention for the catalog uses an underscore, rather than a dash. So if your Integration catalog is called "my store", it would be "my_store"

1 Like

That's correct, @joe.w, thanks for pointing that out :100: