Webhooks are a powerful tool that allows you to receive notifications about specific events or actions without the need for periodic API calls. By subscribing to webhooks, you can automate your app’s operations and trigger custom actions based on these events. For example, you can use webhooks to receive notifications when a customer adds a product to their cart or creates a new order. By subscribing to these webhooks, you can easily stay informed and execute your own code based on these actions.
Registering Webhooks
To register webhooks with WebCommander, you need to provide two pieces of information: the sourceUrl and the eventName. WebCommander will then trigger an action based on the specified event name and call the URL provided in the source URL. This URL can be one of your app’s endpoints where you have implemented the necessary code to handle the webhook and perform the desired operation.
Here is an example of how to register webhooks with WebCommander:
"webhooks": [
{
"sourceUrl": "https://yourapp.com/api/v1/cart/added-to-cart", // The url WebCommander will call when firing this hook
"eventName": "added-to-cart", // A webhook event name. Check Webhook list to find details
"renderScope": "", // Required for script tags
"accessType": "webhook" // A data access type to define which way your plugin collecting data.
}
],
By leveraging webhooks, you can streamline your app’s processes, avoid unnecessary API calls, and enable real-time integration with external systems.
Installation
To register webhooks for a site using the /install endpoint in WebCommander, you’ll need to provide a list of event names and source URLs. Below is an example response format that illustrates how to set up webhooks:
When developing plugins for WebCommander, it’s essential to understand how to request access to specific store data during the app installation process. This guide focuses on API access scopes, which determine the boundaries and permissions of your plugin within the WebCommander ecosystem.
During installation, you must specify which parts of the system your plugin can access. This helps maintain the security and integrity of WebCommander stores. Below is an example of how to define API access scopes during installation:
In this example, the plugin developer has requested access to specific scopes: discount_profile, customer_create, and customer_orders. As a result, the plugin can only read and write data related to these modules. Access to product data is not granted because it was not included in the installation scope.
Example Installation Configuration
Here is a complete example of an installation configuration, including WebHooks, Script Tags, and API access scopes:
{
"webhooks": [
{
"sourceUrl": "https://yourapp.com/api/v1/cart/added-to-cart", // The url WebCommander will call when firing this hook
"eventName": "added-to-cart", // A webhook. Check Webhook list to find details
"renderScope": "", // Required for script tags
"accessType": "webhook" // A data access type to define which way your plugin collecting data.
}
],
"scriptTag": [
{
"sourceUrl": "https://yourapp.com/assets/js/script-tag.js", // The JS file URL webcommander will render in the head where you can manipulate its dom/data through JS code. Also possible to customise css.
"eventName": "", // Not required for Script Tags.
"renderScope": "All", //Required for script tags. Values: "All/Specific page url"
"accessType": "scriptTag" // A data access type to define which way your plugin collecting or manipulating data.
}
],
"apiAccessScopes": [
"discount_profile",
"customer_create",
"customer_orders"
]
}
When a client installs your WebCommander plugin, the platform will call the root URL of your site and render the page through an iframe as the plugin’s manage page. To ensure your plugin works seamlessly within the WebCommander ecosystem, it’s recommended to develop your root URL as a page that provides all the necessary plugin configurations. Follow WebCommander’s guidelines and best practices to create a user-friendly and efficient root URL.
The screenshots above show the manage page of the Clubeez plugin, which is rendered through an iframe inside the WebCommander admin. You don’t need to worry about how the forms on this page communicate with WebCommander site data, as this is your plugin’s page and it can directly communicate with the plugin database. You can use the sample request below as a reference:
var options = new RestClientOptions("")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("https://yourapp.com?uuid=F8A3-A88E-C6EF-B1CB×tamp=1683788339&hmac=CIaGf7Ely0ykfBOi94hEPUAacyaHmjB4oZHc0JMVLMM=", Method.Get);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
Request Details
Request URL:https://yourapp.com/
Request Method:GET
Request Parameter
Name
Type
Description
uuid
String
Plugins UUID
timestamp
String
The time of the request or the current time
hmac
String
The encryption key we found from the installation process contains encrypted data to validate requests
When developing your WebCommander plugin, you’ll need to interact with WebCommander data to provide the desired functionalities. Here’s how to access and modify WebCommander data:
Using Configuration Endpoints
Base URL: The base URL is the client site URL where the plugin is requested for installation.
Authentication: To make requests to WebCommander, include the “accessToken” and “uuid” values in the request header, ensuring they are in the proper format and syntax required by WebCommander.
customer-registration-fields
To check the status of customer meta fields, you can call the following endpoint. Examples of how to use this endpoint are provided below:
WebCommander allows you to create various types of discount profiles, and you can use the following request to learn more about them and their statuses. Below are some examples of how to use this request:
Every WebCommander plugin should have its own configuration or management page section where plugin operations are handled. To access or modify data from different modules, you need to follow appropriate protocols and guidelines such as authentication, encryption, and secure storage practices. By implementing your plugin’s configuration page section properly, you can ensure that your plugin is both effective and compliant with WebCommander’s policies. Follow instructions carefully to ensure smooth and effective plugin operation within the WebCommander ecosystem.
To successfully develop a plugin for WebCommander, it’s essential to understand the required endpoints for communication with the platform. These endpoints facilitate the installation and uninstallation of your plugin. Here, we outline the necessary endpoints and provide examples in various programming languages for your reference.
Install Endpoint
When a client initiates the installation process for your WebCommander plugin, the platform will first look for your /install endpoint. You must develop this endpoint to handle specific payloads provided by WebCommander. Based on the response from your /install endpoint, WebCommander will determine which modules your plugin needs access to and complete the installation process within the client’s site.
When a client initiates the uninstallation process for your WebCommander plugin, WebCommander will call your /uninstall endpoint. This endpoint must be developed to handle specific payloads provided by WebCommander. The payload contains data related to the client’s site, which your plugin will use to perform necessary cleanup operations.
var options = new RestClientOptions("")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("https://yourapp.com/uninstall?uuid=F8A3-A88E-C6EF-B1CB", Method.Get);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
In the initial stages of plugin development for WebCommander, you can create a configuration page, which serves as the central hub for your plugin’s setup. This page will also determine where users land when they access your plugin through the marketplace. Additionally, you must set up the install and uninstall endpoints for your plugin. After installation, your plugin can return various types of configurations, such as webhooks, scriptTags, widgets, customerProfileTabs, and apiAccessScopes. It’s important to clearly state what you need from these configurations during this process.
Configuration Page
Your plugin’s configuration page, often referred to as the landing page, is where users can adjust settings, connect to external services, and customise how your plugin behaves within WebCommander.
Install and Uninstall Endpoints
During the installation process of your plugin, you need to implement both the install and uninstall endpoints. These endpoints are crucial for setting up and removing your plugin’s functionality within WebCommander.
Install Endpoint
The install endpoint is responsible for returning the configurations that your plugin requires. It can return four types of configurations: webhooks, scriptTags, widgets, customerProfileTabs, and apiAccessScopes.
The uninstall endpoint handles the removal of your plugin’s functionality from WebCommander. It should perform any necessary cleanup or de-registration of resources associated with your plugin.
Plugin Integration Options
Webhooks
Webhooks allow your plugin to subscribe to and receive notifications about specific events within WebCommander. To request webhooks, you need to specify the name, scope, access type, event name, and source URL.
ScriptTags enable you to inject JavaScript code into the WebCommander interface. You can use them to manipulate the DOM or customise the user interface. When requesting script tags, define the source URL and render scope.
Customer Profile Tabs let you add custom tabs to the customer profile section in WebCommander. Define the tab’s identifier, display name, and source URL.
Example
{
"scopes": ["read_orders", "write_products"]
}
ApiAccessScopes
ApiAccessScopes determines the level of access and permissions your plugin requires when interacting with WebCommander’s APIs. Specify the needed scopes for your plugin’s functionality.
Example
{
"scopes": ["read_orders", "write_products"]
}
Creating a plugin configuration page and implementing install and uninstall endpoints are essential steps in WebCommander plugin development. By specifying the required configurations, such as webhooks, scriptTags, widgets, customerProfileTabs, and apiAccessScopes, you can tailor your plugin to meet specific needs and interact seamlessly with WebCommander.
Partners can easily manage their plugins in the WebCommander marketplace through the Partner Portal. This central hub allows partners to make changes to their offerings and expand their presence in the marketplace. Here’s how you can add or remove plugins:
Adding Plugins to The Marketplace
As a partner/developer, you can expand your offerings and provide more value to your customers by adding plugins to the system. Here’s how you can easily create and submit a new plugin:
Click on the “Add Plugin” button on the dashboard.
Enter the Plugin Name, Category, and Short Description. The category helps users find your plugin easily
Provide detailed information about the plugin. You can upload a logo, preview images and videos, a plugin description, website and support document URLs, Privacy Policy URLs, and your preferred pricing model for the plugin. This information helps users understand what your plugin does and how it can benefit them.
To ensure that your plugin is available through the WebCommander marketplace, it is essential to provide the base URL of your project in the plugin URLs section. Please refer to our Required Endpoints
section for more details on this critical step.
Upload a plugin source file in ZIP format with the Version number. Make sure the plugin source file includes everything necessary for the plugin to function properly.
After completing each step, the index will indicate that the step has been completed with a green tick mark.
When you have completed all the steps, you can submit the plugin for review.
Your plugin will have the following status:
Draft: if you have not yet submitted it.
In Review: if the support team is reviewing it.
Active: if the plugin has been approved. The approved plugin will automatically be added to the marketplace.
Rejected: if the plugin has been rejected
If your plugin doesn’t get approved, don’t worry. We’ll provide you with valuable feedback that will highlight the areas that need improvement. With this feedback, you can make the necessary changes and resubmit your plugin for reconsideration. It’s important to implement these changes to ensure that your plugin meets the necessary standards for approval.
Removing Plugins From the Marketplace
From the plugin list, click on the plugin you want to remove. It will take you to the plugin details page.
In the plugin details page, click on the kebab menu on the right side of the screen.
You will find the “Delete Plugin” option. If you click the “Delete Plugin” button, it will ask for confirmation if you want to delete it or not.
If you confirm the deletion, the plugin will be removed from the marketplace.
Please note that the WebCommander team reserves the right to remove your plugin from the marketplace if it violates our guidelines or poses a risk to the platform or its users. We are committed to maintaining a secure and reliable environment for our partners and customers. Therefore, we may take action to ensure the integrity and quality of the plugins available in the marketplace.
We hope this guide has helped add and remove plugins to/from the system as a partner. If you have further questions or concerns, please contact our support team for assistance.
As a partner, your responsibility includes the creation and customisation of websites, along with the testing of your plugins. You have the flexibility to design both e-commerce and web content platforms using the ‘create website’ feature available through the partner portal.
Creating a Website
To create a website, follow the steps given below:
Click on the “Create Website” Button.
Enter the Business Name, Client Email, First and Last Name, and Country Name of the client.
Answer the question “Do you want to sell online?” with Yes or No. If the answer is Yes, an e-commerce site will be deployed. If the answer is No, a web content site will be deployed.
If the website is deployed successfully, it will carry an “Active” status.
Managing a Website
Once a website is created, you can manage it by following the steps given below:
Click on “Website” from the sidebar menu.
You will see a list of websites that you have created.
You can identify each website as Ecommerce or WebContent.
You can log in to each website to manage it.
Access the details view page of a website by clicking on the corresponding tile or card.
You can update the website’s information and upload images from the details view page.
To delete a website, click on the delete button, and confirm it with the popup message.
Client Login Details
You can provide login details to your client by following the steps given below:
Access the details view page of a website by clicking on the corresponding tile or card.
To send login information to your client, click on the kebab menu or three-dot menu, and choose the “Send login info to client” option.
A popup titled “Invite Client to Login” will appear, displaying the email subject and message that you can use to invite your client to log in.
To share the login information with your client, click on the “Send invitation” button.
By following the steps mentioned above, you can create websites for your clients, manage them, and provide login details to your clients. In case you face any glitches or errors while creating or managing a website, you will see an error message screen. For any further assistance or queries, please contact our support team.
Joining the WebCommander Partner Program is a straightforward process. As a new partner, you can start the signup/registration process by providing your name, email address, and password. Once you have completed the signup process, you will be redirected to the Setup Wizard, where you can provide more information about your business and products.
Signup Process
To create an account, go to the signup page: Partner Program
In the signup page fill in your name, email, and password in the spaces provided.
Your name should be your full name.
Enter your email address in the next space. Make sure it’s a valid email address that you can access, as you’ll need it to log in later.
Choose a password that’s both easy for you to remember and secure. It should be at least eight characters long and include a mix of upper and lower case letters and at least one number or symbol.
Once you’ve filled in all the fields, click the “Sign up” button.
The system will check your information to ensure everything is correct and secure. If there are any issues, you’ll be prompted to fix them.
If everything is in order, you will be directed to the “Setup Wizard” to proceed further.
Setup Wizard
As a new partner in our program, it is necessary for you to set up your account by completing a setup wizard. This wizard has been designed to assist you in the process of account setup and ensure a seamless and efficient onboarding experience for you.
From the setup wizard, which will begin with a greetings page.
On the business details page of the wizard, you will be asked to enter information about your business, including your business name, email address, phone number, and Website URL.
After you’ve filled in your business details, click the “Next” button to proceed to the address information page.
On the address page, you will be prompted to enter your business address. This may include your street address, city, state/province, postal code, and country.
Once you’ve filled in your address information, click the “Complete Setup” button.
Congratulations! You’ve now signed up and completed the setup wizard for your account. You should now be able to access your account dashboard and begin using the platform.
To proceed with creating a template, the next step is to create a website. By following the instructions in Building a Website, you will be guided through the process of creating a website, which is a crucial step in the template creation process.