Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Configure a custom order submit integration job

Describes details on configuring a custom integration job to submit an order and write the order data to an SQL Server database in Optimizely Configured Commerce.

  1. Create a new SQL Server database.

  2. Run the script in the file attached at the end of this article called Create-dbo.Orders-Table.sql against your SQL Server database.

  3. Go to Admin Console > Administration > Jobs > Connections.

  4. Click the Add Integration Connection button.

  5. Choose SqlServer from the Type Name menu.

  6. Populate the Url, Log On and Password fields to configure it to connect to the new SQL Server database created in Step 1.

  7. Go to Admin Console > Administration > Jobs > Job Definitions.

  8. Click Import to import the integration job from the Order-Submit-JobDefinition.json file attached at the end of this article.



    The new job must be called "Order Submit". If you rename this job it will NOT run automatically after an order has been submitted on the site.

  9. In Visual Studio, create a new class library called "Custom Integration".

  10. Add these references to the class library:

    • Insite.Common
    • Insite.Integration
    • Insite.WIS.Broker
    • *System.Runtime.Serialization
  11. Add a new class called "IntegrationProcessorFakeERPSubmit" using the code found in the file attached at the end of this article called IntegrationProcessorFakeERPSubmit.cs.

  12. Update the values in this file for the database connection info on this line:

    protected string Cnn = "Server=localhost;User Id=sa;Password=[CHANGE THIS];Initial Catalog=FakeERP;";
  13. Build the project. After the build completes, go to the CustomIntegration folder within your project and copy the CustomIntegration.dll file.

  14. Go to the install path of the WIS and paste the CustomIntegration.dll file into your dll folder.



    Make sure to stop the WIS service first before copying in the dll file. Once the file is in your dll folder then start the WIS service again.

  15. Verify the WIS logfile.txt contains the following: "Found Custom Integration Processor FakeErpSubmit, registering in Unity".

  16. Return to the Admin Console to complete the configuration of the integration job definition.

  17. Go back to the Order Submit job created earlier in this article. In the IntegrationProcessor field select the newly created processor "FakeErpSubmit".

  18. Submit an order on the site and verify that the order record was created in your SQL Server database.

Use this link to download the files referenced in this article: