PHPackages                             oscar-team/customerio-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. oscar-team/customerio-laravel

ActiveLibrary[API Development](/categories/api)

oscar-team/customerio-laravel
=============================

Package will be used to create customers and events on Customer.io using Laravel

2.0.4(1y ago)210.1k↓33.3%1[1 issues](https://github.com/oscar-team/customerio-laravel/issues)[1 PRs](https://github.com/oscar-team/customerio-laravel/pulls)MITPHPPHP &gt;=8.0CI passing

Since Mar 27Pushed 9mo ago2 watchersCompare

[ Source](https://github.com/oscar-team/customerio-laravel)[ Packagist](https://packagist.org/packages/oscar-team/customerio-laravel)[ Docs](https://github.com/oscar-team/customerio-laravel)[ RSS](/packages/oscar-team-customerio-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (13)Used By (0)

Customer.io Integration with Laravel
====================================

[](#customerio-integration-with-laravel)

Package is used to create/update customer and events for customer on Customer.io Package is using `printu/customerio` package.

### Installtion

[](#installtion)

```
composer require oscar-team/customerio-laravel
```

You can also publish the config file with:

```
php artisan vendor:publish --tag=customerio-config
```

Generate `Site ID`, `API Key` and `App API Key` from Customer.io and setup variables in `.env` file.

```
CUSTOMER_IO_DEFAULT_WORKSPACE=VALUE
CUSTOMER_IO_SITE_ID=VALUE
CUSTOMER_IO_API_KEY=VALUE
CUSTOMER_IO_APP_API_KEY=VALUE
```

If you want to setup more workspaces to connect to, then you need to copy the add them into `config/customerio.php` in the `workspaces` key. Each workspace needs to have these 3 keys: `api_key`, `app_api_key`, `site_id`.

### Usage

[](#usage)

Include `use Oscar\CustomerioLaravel\Facades\CustomerIo;` in your `controller` and add following function.

#### Create customer.io object

[](#create-customerio-object)

```
$customerIo = CustomerIo::workspace();
```

or

```
$customerIo = CustomerIo::workspace('us_market');
```

#### Search Customer by Email

[](#search-customer-by-email)

```
$isCustomer = $customerIo->searchCustomerByEmail($email);
```

#### Create Customer

[](#create-customer)

`email` is required to create customer and `id` is option but cannot be null. It is possible to add more attributes you want to add for customer.

```
$customerData = [
    'id' => 1
    'email' => 'demo@test.com',
    'first_name' => 'john',
    'last_name' => 'doe',
];
$customerIo->addCustomer($customerData);
```

#### Update Customer

[](#update-customer)

`email` is required to create customer and `id` is option but cannot be null.

```
$customerData = [
    'id' => 1
    'email' => 'demo@test.com',
    'first_name' => 'Doe',
    'last_name' => 'John',
];
$customerIo->updateCustomer($customerData);
```

#### Create Event

[](#create-event)

While creating and event, `id` or `email` is used to link the event with customer, for

```
$eventData = [
    'id' => 1
    'email' => 'demo@test.com',
    'name' => 'Event Created',
    'data' => []
];
$customerIo->createEvent($eventData);
```

#### Send email

[](#send-email)

```
$emailData = [
    'transactional_message_id' => 123, // can also be a string depending how the template is configured in Customer.io
    'identifiers' => [ // you need to send only one of these, depending which one you want and use in Customer.io
        'id' => 'your_own_custom_id_in_cio',
        'email' => 'demo@test.com',
        'cio_id' => 'customer_id_generated_by_cio',
    ],
    'to' => '\"Destination Person\" ',
    'body' => 'This is my test email', // required if 'transactional_message_id' is not provided; will override the body of the template if both are passed
    'subject' => 'Subject for my test email', // required if 'transactional_message_id' is not provided; will override the subject of the template if both are passed
    'from' => '\"Sender Person\" ', // required if 'transactional_message_id' is not provided; will override the from of the template if both are passed
    'message_data' => [
        '' => '' // key-value pair for each parameter you have in the template. replaced `` with the actual name of the parameter and `` with the actual value of the parameter
    ],
];
```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~68 days

Recently: every ~95 days

Total

10

Last Release

536d ago

Major Versions

1.0.4 → 2.0.02023-11-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/2c180bc2d530a9f78c0a1137895fb224e48f09644f5d1152c23c72295ee23ee0?d=identicon)[babarmalik6444](/maintainers/babarmalik6444)

---

Top Contributors

[![adnedelcu](https://avatars.githubusercontent.com/u/1168310?v=4)](https://github.com/adnedelcu "adnedelcu (9 commits)")[![babarafzaal](https://avatars.githubusercontent.com/u/57573892?v=4)](https://github.com/babarafzaal "babarafzaal (9 commits)")[![giltotherescue](https://avatars.githubusercontent.com/u/371250?v=4)](https://github.com/giltotherescue "giltotherescue (1 commits)")[![moiz2050](https://avatars.githubusercontent.com/u/820400?v=4)](https://github.com/moiz2050 "moiz2050 (1 commits)")

### Embed Badge

![Health badge](/badges/oscar-team-customerio-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/oscar-team-customerio-laravel/health.svg)](https://phpackages.com/packages/oscar-team-customerio-laravel)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
