/
Tömeges kontakt szinkronizáció

Tömeges kontakt szinkronizáció

<?php require "../vendor/autoload.php"; use de\xqueue\maileon\api\client\contacts\ContactsService; use de\xqueue\maileon\api\client\contacts\Contact; use de\xqueue\maileon\api\client\contacts\Permission; use de\xqueue\maileon\api\client\contacts\StandardContactField; use de\xqueue\maileon\api\client\contacts\SynchronizationMode; use de\xqueue\maileon\api\client\contacts\Preference; function synchronizeMaileonContacts() { $maileon_config = array( 'BASE_URI' => 'https://api.maileon.com/1.0', 'API_KEY' => 'api_kulcs', 'TIMEOUT' => 5 ); $contacts = [ new Contact(null, 'test@maileon.hu', Permission::$DOI_PLUS, -1, false, [ StandardContactField::$FIRSTNAME => 'Jakab', StandardContactField::$LASTNAME => 'Gipsz', ], [ 'custom_field1' => 'Egy érték' ], null, null, [ new Preference('EmailSegment1', null, 'Email', true), new Preference('EmailSegment2', null, 'Email', false), new Preference('EmailSegment3', null, 'Email', false), new Preference('EmailSegment4', null, 'Email', true) ]), new Contact(null, 'test2@maileon.hu', Permission::$DOI_PLUS, -1, false, [ StandardContactField::$FIRSTNAME => 'János', StandardContactField::$LASTNAME => 'Kovács', ], [ 'custom_field1' => 'Egy másik érték' ], null, null, [ new Preference('EmailSegment1', null, 'Email', false), new Preference('EmailSegment2', null, 'Email', false), new Preference('EmailSegment3', null, 'Email', true), new Preference('EmailSegment4', null, 'Email', true) ]) ]; $ignoreInvalid = true; $reimportUnsubscribed = false; $overridePermission = false; $updateOnly = false; $contacts_service = new ContactsService($maileon_config); $response = $contacts_service->synchronizeContacts( $contacts, Permission::$DOI_PLUS, SynchronizationMode::$UPDATE, false, $ignoreInvalid, $reimportUnsubscribed, $overridePermission, $updateOnly ); if($response->isSuccess()) { echo 'Sikeres szinkronizáció!'; } else { echo 'Sikertelen szinkronizáció'; echo '<pre>'; echo $response->getBodyData(); echo '</pre>'; } } synchronizeMaileonContacts();

 

Related content

Kontakt létrehozása Maileon PHP Kliens használatával
Kontakt létrehozása Maileon PHP Kliens használatával
More like this
Tranzakció létrehozása Maileon PHP Kliens használatával
Tranzakció létrehozása Maileon PHP Kliens használatával
More like this
Tranzakció létrehozása HTML tartalommal
Tranzakció létrehozása HTML tartalommal
More like this
Leiratkozók lekérdezése
Leiratkozók lekérdezése
More like this
Kontaktok
Read with this
Kontakt létrehozása Maileon .NET Kliens használatával
Kontakt létrehozása Maileon .NET Kliens használatával
More like this