PHPackages                             joelgrondrup/silverstripe-microbizz - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. joelgrondrup/silverstripe-microbizz

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

joelgrondrup/silverstripe-microbizz
===================================

Adds support for event handling for Microbizz in a SilverStripe environment

v1.0.5(3mo ago)00BSD-3-ClausePHPPHP ^8.2

Since Dec 9Pushed 3mo agoCompare

[ Source](https://github.com/joelgrondrup/silverstripe-microbizz)[ Packagist](https://packagist.org/packages/joelgrondrup/silverstripe-microbizz)[ Docs](https://github.com/joelgrondrup/silverstripe-microbizz)[ RSS](/packages/joelgrondrup-silverstripe-microbizz/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (7)Used By (0)

🧩 SilverStripe Microbizz Integration
====================================

[](#-silverstripe-microbizz-integration)

Overview
--------

[](#overview)

🔌 **Connect to Microbizz**
This module provides an interface to listen to one or more [Microbizz systems](https://microbizz.com/en), capture [complex objects](https://micropedia.microbizz.com/tec/complex-types) when commands are issued, and act upon them. You can also create custom interface endpoints to embed iframes in the Microbizz CRM system.

Installation
------------

[](#installation)

📦 **Install via Composer**
Run the following command to install the module:

```
composer require joelgrondrup/silverstripe-microbizz
```

After this run:

```
dev/build
```

🛠 **Configure the CMS**
Once the database is built, you will see a button labeled "Microbizz Applications" in the CMS. Start by creating a Microbizz Application in the CMS by entering a public and secret key. Contact [Ventu](https://micropedia.microbizz.com/tec/making-a-microbizz-app) commercial support to obtain these keys.

[![Image of fields for public and secret developer key](docs/images/doc-image-1.jpg)](docs/images/doc-image-1.jpg)

### Activate Application

[](#activate-application)

🔗 **Establish Connection**
You must conduct a handshake with Microbizz to receive an access token, contract ID, and endpoint URL. Click "Activate" and follow the instructions. You may fill out hooks and interfaces before activating, but this can also be completed afterward.

After a successful handshake, the access token, endpoint, and contract fields should be populated.

[![Image of fields for access token, endpoint, and contract](docs/images/doc-image-4.jpg)](docs/images/doc-image-4.jpg)

### Enter User Information for API Requests

[](#enter-user-information-for-api-requests)

🔑 **API Credentials**
Complete the configuration by providing an API key, username, and password, which should be created in the corresponding Microbizz system. This information will be beneficial when extending hooks and interfaces.

Hooks for Event Endpoints
-------------------------

[](#hooks-for-event-endpoints)

🔔 **Receive Events**
To capture your first event objects from Microbizz, create a webhook and provide a mod and a hook code. Remember, hooks are necessary for obtaining event endpoint types.

[![Image of fields for webhook with title, mod and hook code](docs/images/doc-image-2.png)](docs/images/doc-image-2.png)

You can add as many hooks as needed. Available events are listed [here](https://micropedia.microbizz.com/tec/making-a-microbizz-app#MakingaMicrobizzapp-Programmingendpoints). After adding event hooks, activate them by clicking "Activate" and follow the form in Microbizz.

Once data is received from Microbizz, use the "Event log" tab to view all incoming data, or check individual hooks to view events specific to each webhook.

### Working with Event Data

[](#working-with-event-data)

⚙️ **Customize Functionality**
For each hook, you can craft custom functions that will be triggered when the hook is activated. All possible actions are listed in a dropdown under the "Actions" tab. To create these functions, extend the `BaseWebhook` class and add static functions.

#### Example

[](#example)

```
