This section describes creating a custom code project. You can create a custom code project using either Visual Studio 2022 Community or Visual Studio Code. Creating a custom code project involves:

  • Installing NuGet Templates: Install the NuGet templates from the NuGet feed onto your local machine.
  • Creating a Project: Use a relevant template to create a new callback and service hook project.
  • Building a Project: Once your callback and serviceHook project is developed locally and built without errors, a zip file is automatically generated at the project path. This zip file is ready to be pushed to the import API for deployment on the Conga RLC.

Prerequisites

To create a custom code project using Visual Studio Code

  1. Open Visual Studio Code.

  2. Go to Menu > View, and select Terminal from the list, or press Ctrl + ` (backtick) on your keyboard.
  3. Uninstall existing templates by running the following command before installing the NuGet template.

    1. View the list of existing templates.

      dotnet new --uninstall
      CODE
    2. Check for the Conga.Platform.Extensibility.Templates entry in the list and if it is available, run this command to remove it.

      dotnet new uninstall Conga.Platform.Extensibility.Templates
      CODE
    3. Verify by re-running step a.
  4. Run this command to install a specific version of the NuGet template. Version is the NuGet version number, such as 2023.X.X.X or latest. Please get in touch with Conga Support for more details about the list of default NuGet templates provided by Conga.

    dotnet new install <NuGet Templates Package Name>::<version>
    CODE

    For example:

    dotnet new install Conga.Platform.Extensibility.Templates::202311.1.0.44
    CODE
  5. Go to the project directory using the command:

    cd <Callback Template ShortName>
    CODE

    If it must be part of a new directory, first create a directory using these command:

    md <Callback Template ShortName>
    
    mkdir <Callback Template ShortName>
    CODE
  6. Now you are ready to create a callback or service hook custom code project using a template. Run the following command to create a custom code project.
    Use the proper ShortName for the template and ensure that you are in the directory where you want to create a callback or service hook custom code project. The project name you specify below is used as the namespace for each class in the project.

    dotnet new <Callback Template ShortName> -n <ProjectName>
    CODE

    For example;

    dotnet new pricingbasepricecallback -n SamplePricingBasePriceCallback
    CODE
  7. Go to the directory in which your csproj file is created with the command:

    cd <ProjectName>
    CODE

    For example:

    cd SamplePricingBasePriceCallback
    CODE
  8. Update the template code as needed and then build your project using the command:

    dotnet build
    CODE

    If you get an error related to a PowerShell file, then get the execution policy by running the command:

    Get-ExecutionPolicy
    CODE

    If this returns a restricted execution policy, run the following command to update it. 

    Set-ExecutionPolicy remotesigned
    CODE

    The project is built and the <ProjectName>.zip file is created at the project location.

Perform these steps once to create the Callback or ServiceHook custom code project. Afterward, your team can start working on specific features by creating feature branches. You can se Conga helpers to easily integrate features like data access, telemetry, etc., into custom code.

Please get in touch with Conga Support for helper details.

When the feature development is finished, team members must commit changes to their feature branch and then submit a pull request to a relevant branch, like "dev". Once the responsible owner approves and merges the pull request after a custom code review, the continuous integration (CI) pipeline kicks in automatically. The pipeline generates a build artifact on success.

To create custom code using Visual Studio 2022 Code Community, follow steps 1 to 5, and once project is created, open it in Visual Studio 2022 Code Community to build it. NuGet templates callback are compatible with .NET 6 and work with .NET 6.0 target framework.

To update the NuGet version

  1. Open Visual Studio Code.

  2. Go to Menu > View, and select Terminal from the list, or press Ctrl + ` (backtick) on your keyboard.
  3. Use the following commands to update the NuGet templates in your project with an appropriate version. This is an example command with sample versions, Replace the version numbers with the latest available versions to use all recent updates. Please get in touch with Conga Support for more details about the list of default NuGet templates provided by Conga.

    Packages

    dotnet add package Conga.Platform.Extensibility.Library --version 202311.1.0.38
    dotnet add package Conga.Revenue.Common.Callback --version 22023.12.0.2
    dotnet add package Conga.Approvals.Common.Callback --version 2023.3.0.2
    dotnet add package Conga.Contracts.Common.Callback --version 2023.11.0.2
    CODE