Set up the Marketplace app metadata

PDF
Medium

Creatio version 8.0.2 and later can store Marketplace app metadata.

In this case, metadata is app details stored within the app itself regardless of an environment.

The Marketplace app metadata stores the following parameters:

  • icon (Select icon field)
  • icon color (Color field)
  • name (Give it a name field)
  • description (Describe what it’s for (optional) field)
  • code (Application code field)

Set up the parameter values within the Marketplace app metadata in the Application Hub. Learn more about the Application Hub in the user documentation: Create a custom app. Creatio lets you add metadata to a published or new Marketplace app.

To set up or change app metadata, follow the instructions in the user documentation for generic Creatio apps: Set up the app metadata. You can fill out the parameters only when you create an app, but you can change them at any moment. The code is generated on app creation and cannot be changed later.

Note. Add metadata to Marketplace apps developed for version 8.0.1 and earlier, i. e., apps without metadata.

Make sure the app metadata meets the requirements listed in a separate article: Requirements for Marketplace app.

Add metadata to a published Marketplace app 

The procedure to add metadata to a published Marketplace app depends on the number of packages that contain the app functionality.

Add metadata to a published Marketplace app that has a single package 

  1. Install the Marketplace app into Creatio version 8.0.2 or later. To do this, follow the instruction in the user documentation: Install apps from the Marketplace.
  2. Unlock the package that contains the Marketplace app functionality using the Clio utility. To do this, follow the instructions in the utility documentation on GitHub.
  3. Unlock the Marketplace app in the Application Hub. To do this, execute the SQL script provided below in the database.

    SQL script template
    Microsoft SQL
    Oracle
    PostgreSQL
    UPDATE SysInstalledApp
    SET Maintainer = (SELECT TextValue FROM SysSettings
        JOIN SysSettingsValue ON SysSettingsValue.SysSettingsId = SysSettings.Id
        WHERE Code = 'Maintainer'
        AND SysSettingsValue.SysAdminUnitId = 'A29A3BA5-4B0D-DE11-9A51-005056C00008')
    WHERE name='SomeMarketplaceApplicationName'
    
    UPDATE "SysInstalledApp"
    SET "Maintainer" = (SELECT "TextValue" FROM "SysSettings"
        JOIN "SysSettingsValue" ON "SysSettingsValue"."SysSettingsId" = "SysSettings"."Id"
        WHERE "Code" = 'Maintainer'
        AND "SysSettingsValue"."SysAdminUnitId" = '{A29A3BA5-4B0D-DE11-9A51-005056C00008}') 
    WHERE "Name" = 'SomeMarketplaceApplicationName'
    
    UPDATE "SysInstalledApp"
    SET "Maintainer" = (SELECT "TextValue" FROM "SysSettings"
        JOIN "SysSettingsValue" ON "SysSettingsValue"."SysSettingsId" = "SysSettings"."Id"
        WHERE "Code" = 'Maintainer'
        AND "SysSettingsValue"."SysAdminUnitId" = 'A29A3BA5-4B0D-DE11-9A51-005056C00008')
    WHERE "Name" = 'SomeMarketplaceApplicationName'
    

    SomeMarketplaceApplicationName is the name of the installed package that contains the Marketplace app functionality.

  4. Change the Marketplace app metadata. To do this, follow the instruction in the user documentation: Set up the app metadata.
  5. Lock the package that contains the Marketplace app functionality. To do this, execute the SQL script provided below.

    SQL script template
    Microsoft SQL
    Oracle
    PostgreSQL
    UPDATE SysInstalledApp
    SET Maintainer='SomeMarketplaceApplicationMaintainer'
    WHERE Name='SomeMarketplaceApplicationName'
    
    UPDATE "SysInstalledApp" 
    SET "Maintainer" = 'SomeMarketplaceApplicationMaintainer'
    WHERE "Name" = 'SomeMarketplaceApplicationName'
    
    UPDATE "SysInstalledApp" 
    SET "Maintainer" = 'SomeMarketplaceApplicationMaintainer'
    WHERE "Name" = 'SomeMarketplaceApplicationName'
    

    SomeMarketplaceApplicationMaintainer is the publisher of the package that contains the Marketplace app functionality.

    SomeMarketplaceApplicationName is the name of the installed package that contains the Marketplace app functionality.

  6. Export the package that contains the Marketplace app functionality. To do this, follow the instruction in a separate article: Application Hub.
  7. Upload the *.zip archive that contains the Marketplace app to the Developer profile.
  8. Send the Marketplace app for verification. After the Creatio Marketplace support verifies the Marketplace app, it is automatically published on Creatio Marketplace. After the Marketplace app is installed into Creatio, the app will display the specified parameter values.

Add metadata to a published Marketplace app that has multiple packages 

If you install a Marketplace app that comprises multiple packages and has no metadata into Creatio version 8.0.2 or later, Creatio generates metadata automatically and saves it to an arbitrary package. If Marketplace apps that have different metadata uses the same base packages, the package installation ends with an error.

Attention. Use the target package that contains metadata only in one Marketplace app.

To add metadata to a published Marketplace app that has multiple packages:

  1. Choose a unique package to store the Marketplace app metadata. Do not use this package in other Marketplace apps.
  2. Prepare the unique package before installing it into Creatio version 8.0.2 or later.

    1. Install the Clio utility (performed once). To do this, follow the instructions in the utility documentation on GitHub.
    2. Unpack the *. zip archive that contains the Marketplace app packages.
    3. Run the Extract package Clio command to unpack the unique package. Learn more in the utility documentation on GitHub.
    4. Download the metadata file and add it to the ...\[Path to package folder]\Files\ directory.
    5. Add the Marketplace app packages to the Packages file property. You can modify other property values in the Application Hub.
    6. Run the Compress package Clio command to compress the changed unique package into a *.gz package archive. Learn more in the utility documentation on GitHub.
    7. Compress the changed unique package and other Marketplace app packages into a *.zip archive.
  3. Install the Marketplace app that contains metadata into Creatio version 8.0.2 or later. To do this, follow the instruction in the user documentation: Install apps from the Marketplace.
  4. Unlock the packages that contain the Marketplace app functionality using the Clio utility. To do this, follow the instructions in the utility documentation on GitHub.

    Attention. If at least one package is locked, an additional package is created automatically when the metadata is changed.

  5. Repeat steps 3–8 of the instruction to add metadata to a published Marketplace app that has a single package.

Add metadata to a new Marketplace app 

The procedure to add metadata to a new Marketplace app depends on the number of packages that contain the app functionality.

Add metadata to a new Marketplace app that has a single package 

To add metadata to a new Marketplace app that has a single package, follow the instruction in the user documentation: Set up the app metadata.

Add metadata to a new Marketplace app that has multiple packages 

Creatio version 8.0.2 and later lets you set a target package and create metadata in it before you start developing a new Marketplace app that contains multiple packages.

Attention. Before you add metadata to a new Marketplace app that contains multiple packages, make sure that the Marketplace app packages are unlocked and do not contain any Marketplace app metadata in Creatio.

To add metadata to a new Marketplace app that has multiple packages:

  1. Choose a unique package to store the Marketplace app metadata. Do not use this package in other Marketplace apps.
  2. Add a lookup based on the SysInstalledApp object. To do this, follow the instruction in a separate article: Create new lookups.
  3. Add a lookup record and fill out the record properties:

    • Enter the app name to display in the Application Hub in the Name property.
    • Enter the app code in the Code property.
    • Specify the Marketplace app developer in the Maintainer property. The value of the property must match the value of the Publisher (Maintainer code) system setting.
    • Enter brief information about the Marketplace app in the Description property.
    • The Marketplace app icon in the App icon property is populated automatically.
    • The background of the Marketplace app icon in the Icon background color property is populated automatically.
  4. Add a lookup based on the SysPackageInInstalledApp object. To do this, follow the instruction in a separate article: Create new lookups.
  5. Add the Marketplace app packages to the lookup and fill out the record properties:

    • Select the Marketplace app package in the Package property.
    • Select the record from the previous step in the Installed application property.
    • Set the Primary property to true for the unique package. Set the property to false for other Marketplace app packages.
  6. Repeat steps 4, 6–8 of the instruction to add metadata to a published Marketplace app that has a single package.