Extendability Model Overview
BoxNCase is extensible in a microservice-based approach. It is possible to add new services to the BoxNCase ecosystem and communicate with them using the GraphQL API. This approach allows you to add new functionality to BoxNCase without modifying the core codebase. It also allows you to use any programming language and framework to build your service.
Why not to fork?
Once you fork a codebase, you technically own the entire platform, which burdens you with maintenance, security fixes, and all future development. You might be tempted to alter small bits of logic and hope to be able to merge updates in the future. But there is a high likelihood that the original codebase would have significant structural changes requiring a complete rewrite of your modifications. Having your version of the codebase also means you are on your own when it comes to support. No community member will have the exact version as you, so troubleshooting assistance and support become challenging.
Forking BoxNCase is not recommended for the following reasons:
- Non-trivial upgrades due to merge conflicts, incompatible business logic and data migrations.
- Limited or non-existing community support.
- Maintenance and security fixes must be applied manually.
- You would have to fork and maintain the Dashboard which is another large codebase.
Ways of customizing:
Extending Dashboard
BoxNCase External Apps allow adding custom logic to the BoxNCase with the ability to extend Dashboard. External Apps are standalone web applications that are given access to the BoxNCase's API. After installation, the App is available in the BoxNCase Dashboard on the Apps page. While opened, the App UI is embedded in the Dashboard using an iframe. This allows the App to be fully integrated with the Dashboard and use the same authentication mechanism. Apart from being available on the Apps page of the Dashboard, External Apps, for ease of use, can be additionally mounted in several places of the Dashboard.
Apps can be granted permissions and perform most actions that a staff member can perform. Apps can also subscribe to certain events as they happen in BoxNCase and get notified about them using webhooks.
For example, you can build an App that can extend the Dashboard with a new page that displays a list of abandoned checkouts. The App will fetch data from BoxNCase about checkouts that for some reason haven't been turned into orders. Such an App can be mounted in the sidebar menu under the Orders section and will be available to all staff members enhancing their knowledge about unfinished orders.
To start building a new BoxNCase application, check the Developing Apps Quickstart.
Admin API calls
Using app tokens you can have admin permissions to read and write objects. Here are some examples of how API keys can be used:
- Create a service that updates stock in BoxNCase.
- Custom cart service that acts as a proxy to BoxNCase checkout to set prices based on custom logic.
- Read private metadata of the products that are only accessible to certain users.
Synchronous Events (API Extensions)
Events that call your service to modify the behavior of certain actions. For example, creating shipping rates dynamically or custom payment integrations. Lean more about Synchronous Events.
Webhooks
BoxNCase can send real-time notifications or data to another application or service through Webhooks. Webhooks provide a way for BoxNCase to send HTTP POST requests to a specified target URL (endpoint) with a payload (through a subscription query) when a specific event, such as order creation, occurs.
For example, a webhook can be used to notify an external service about a new order. The external service can then use the BoxNCase Commerce API to fetch the order details and process it further.
Webhooks enable communication between different systems by delivering event-based information from one system to another. Use BoxNCase's webhook functionality to receive notifications and trigger custom actions or integrations in response to specific events.