After each order being created on WooCommerce we send an event to Flashy with all the order details that has been created.
{"billing": {"email": "[email protected]","city": "New York City","address": "Homelake 1567"},"shipping": {"email": "[email protected]","city": "New York City","address": "Homelake 1567"}}
When you install our WordPress plugin you have access to the API Wrapper and can use all our API endpoints, there is no need to add API KEY if you add it on the WordPress admin panel.
If you need to create contact (without subscribing them to a list) you can use this function:
All contact properties can be added to the contact (phone, address, etc..)
flashy()->api->contacts->create(array("first_name" => "Steve","last_name" => "Jobs","email" => "[email protected]"), false);
If you need to create contact + subscribe them to a list you can use this function:
All contact properties can be added to the contact (phone, address, etc..)
$list_id = 100; // The list ID to subscribe contact toflashy()->api->lists->subscribe($list_id, array("first_name" => "Steve","last_name" => "Jobs","email" => "[email protected]"), false);
If you need to send custom event on a contact profile you can simply do it with this function:
$account_id = 150; // Account ID$email = "[email protected]"; // The contact email address$event = ["event_name" => "CanBeAnything","context" => ["key" => "value"],];flashy()->api->thunder->track($account_id, $email, "CustomEvent", $event);