https://github.com/kewljuice/be.ctrl.unomi
Everything functionally related to integrating with Unomi in CiviCRM
https://github.com/kewljuice/be.ctrl.unomi
civicrm civicrm-extensions
Last synced: about 2 months ago
JSON representation
Everything functionally related to integrating with Unomi in CiviCRM
- Host: GitHub
- URL: https://github.com/kewljuice/be.ctrl.unomi
- Owner: kewljuice
- License: other
- Created: 2020-02-19T19:01:14.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-10T22:25:22.000Z (over 4 years ago)
- Last Synced: 2025-02-02T12:41:21.068Z (4 months ago)
- Topics: civicrm, civicrm-extensions
- Language: PHP
- Homepage:
- Size: 153 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# be.ctrl.unomi
## Introduction
Everything functionally related to integrating with Unomi in CiviCRM.## Installation
- You can directly clone to your CiviCRM extension directory using
```$ git clone https://github.com/kewljuice/be.ctrl.unomi.git```- You can also download a zip file, and extract in your extension directory
```$ git clone https://github.com/kewljuice/be.ctrl.unomi/archive/master.zip```- The next step is enabling the extension which can be done from
```"Administer -> System Settings -> Manage CiviCRM Extensions".```## Requirements
- PHP v7.0+
- CiviCRM 5.0## Configuration
- Manage settings: **yoursite.org/civicrm/unomi/settings**.

- API url: public endpoint to Unomi, event collector & context fetch with session id.
- API username
- API password## Usage
### Unomi Tab on Individual overview
Add a valid profile id from Unomi in the individual contact summary, under fieldset 'Unomi'

### Define CiviCRM fields in Unomi
Define CiviCRM related fields in Unomi via *rule*, this api call passes all individual contact fields (default + custom) to Unomi.
```
$rule = civicrm_api3('Unomi', 'createrule');
```### Update individual contact
This api call updates a specific contact with fields from CiviCRM to Unomi via *event*.
```
$event = civicrm_api3('Unomi', 'createevent', [
'contact_id' => "",
]);
```## Create Segment (example)
```
{
"metadata": {
"id": "developerSegmentCondition",
"name": "developerSegmentCondition",
"description": "The user has this segment if he is a developer.",
"scope": "unomi-website",
"readOnly": true
},
"condition": {
"type": "booleanCondition",
"parameterValues": {
"operator": "and",
"subConditions": [
{
"type": "profilePropertyCondition",
"parameterValues": {
"propertyName": "properties.civicrm_job_title",
"comparisonOperator": "equals",
"propertyValue": "developer"
}
}
]
}
}
}
```## Known Issues
(* FIXME *)
## Useful links
- https://civicrm.stackexchange.com/questions/20316/within-an-extension-how-can-load-a-custom-civi-name-spaced-class
- http://unomi.apache.org/manual/latest/index.html#_useful_apache_unomi_urls
- https://stackoverflow.com/questions/45511956/remove-a-named-volume-with-docker-compose
- https://medium.com/@otavio/giving-unomi-intelligence-a5a11053d595