mymediamagnet / followupboss-api-php
FollowUpBoss 的 PHP 接口。
dev-master
2019-12-09 03:43 UTC
Requires
- php: >=7.1.0
- guzzlehttp/guzzle: *
- nesbot/carbon: ^1.22
- vlucas/phpdotenv: ^2.4
Requires (Dev)
- phpunit/phpunit: 5.2.*
This package is auto-updated.
Last update: 2024-09-09 15:20:57 UTC
README
用于与 Follow Up Boss API 交互的 PHP 接口
如何使用
首先,下载该包
composer require homeup/followupboss-php-api
然后,在你的 .env 文件中添加几行。如果你没有这个文件,创建它并添加到 .gitignore 中
FUB_KEY=my_fub_key
FUB_SOURCE=website_url_or_name
然后,你可以使用以下任何命令向 FollowUp Boss 发送数据。
从 FUB 获取线索数据
$people = new HomeUp\FollowUpBoss\People(); $person = $people->find("test@example.com");
发送线索数据
$events = new HomeUp\FollowUpBoss\Events(); $events->saveLead([ 'firstName', 'John', 'lastName' => 'Smith', 'emails' => [['value' => 'johnsmith@example.com']], 'phones' => [['value' => '555-555-5555']], 'tags' => ['Free Market Report'] ]);
您还可以发送查询事件(示例数据:https://docs.followupboss.com/reference#events-post)
$events->inquiry( ['emails' => [['value' => 'johnsmith@example.com']]], // Lead data "The main body of the inquiry goes here", // Body of inquiry "Enter Type of Inquiry", // Example: "Property Inquiry" or "Registration" [optional_property_data], [optional_property_search_data], [optional_campaign_data] ]);
您还可以发送页面和列表查看数据(示例数据:https://docs.followupboss.com/reference#events-post)
$events->listingView( ['emails' => [['value' => 'johnsmith@example.com']]], // Lead data [property_data], ]); $events->pageView( ['emails' => [['value' => 'johnsmith@example.com']]], // Lead data "Title of the Page", "http://example.com/about", // URL of the page );
您可以为线索添加备注
$notes = new HomeUp\FollowUpBoss\Notes(); $notes->add(id_of_person, "This is the subject of the note", "This is the body of the note");
您可以为线索分配行动计划并检索所有行动计划的列表
$ap = new HomeUp\FollowUpBoss\ActionPlans(); $plans = $ap->get()->actionPlans; $ap->assign(id_of_person, $plans[0]->id);