magicalella / yii2-salesmanago
Salesmanago component for Yii 2 framework
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 1
Type:yii2-extension
Requires
- php: >=5.4.0
- yiisoft/yii2: ~2.0.6
Requires (Dev)
- php: >=5.4.0
- yiisoft/yii2: ~2.0.6
This package is auto-updated.
Last update: 2024-12-21 13:11:07 UTC
README
Salesmanago component for Yii 2 framework
SALESmanago Technical API Documentation
Installation
The preferred way to install this extension is through composer.
Run
composer require "magicalella/yii2-salesmanago" "*"
or add
"magicalella/yii2-salesmanago": "*"
to the require section of your composer.json
file.
Usage
- Add component to your config file
'components' => [ // ... 'salesmanago' => [ 'class' => 'magicalella\salesmanago\Salesmanago', 'clientId' => 'xxxxxx', 'apiKey' => 'xxxxxx', 'apiSecret' => 'xxxxxx', 'endpoint' => 'xxxxxx', 'owner' => 'xxxxxx', ], ]
- Add new contact to SALESmanago
$salesmanago = Yii::$app->salesmanago; $result = $salesmanago->call('contact/upsert',[ contact' => [ 'email' => 'example@example.com', 'state' => 'CUSTOMER', ], 'owner' => 'owner@owner.com', 'tags' => [ 'TAG' ], 'properties' => array('page' => 'newsletter'), 'lang' => 'PL', 'useApiDoubleOptIn' => true, 'forceOptIn' => true, 'forceOptOut' => false, 'forcePhoneOptIn' => true, 'forcePhoneOptOut' => false ] );
Check SALESmanago Technical API Documentation for all available options.