Seamlessly integrate SMS functionality into your Krayin CRM with seven's powerful messaging API. Send individual and bulk SMS messages directly from your CRM interface.
- Features
- Requirements
- Installation
- Configuration
- Usage
- Bulk SMS
- Placeholders
- Troubleshooting
- FAQ
- Support
- License
- Direct SMS Integration - Send SMS messages directly from person and organization records
- Bulk SMS Campaigns - Send messages to multiple contacts simultaneously
- Smart Placeholders - Personalize messages with dynamic contact information
- Performance Tracking - Monitor SMS delivery and engagement metrics
- Admin Configuration - Easy setup through Krayin's admin panel
- Environment Variables - Secure API key management
- Contact Integration - Seamlessly works with existing Krayin contacts
Component | Version |
---|---|
PHP | >= 8.0 |
Krayin CRM | v2.x |
Composer | >= 2.0 |
seven API Key | Get one here |
composer require seven/krayin
Add the service provider to your config/app.php
:
<?php
return [
// ...
'providers' => [
// ...
Seven\Krayin\Providers\SevenServiceProvider::class,
],
// ...
];
Add the package namespace to your composer.json
:
{
"autoload": {
"psr-4": {
"Seven\\Krayin\\": "packages/Seven/Krayin/src"
}
}
}
# Clear cache
php artisan cache:clear
# Run database migrations
php artisan migrate
# Regenerate autoload files
composer dump-autoload
You can configure the seven SMS integration in two ways:
- Navigate to Dashboard → Configuration → seven in your Krayin admin panel
- Enter your seven API Key
- Click Save to apply the configuration
- Add your API key to the
.env
file:
SEVEN_API_KEY=YourSuperSecretApiKeyFromSeven
- Update
config/services.php
:
return [
// ...
'seven' => [
'api_key' => env('SEVEN_API_KEY'),
],
];
- Clear and cache configuration:
php artisan cache:clear && php artisan config:cache
Note: Admin panel configuration takes precedence over environment variables.
- Navigate to Contacts → Persons
- Find the person you want to message
- Click the seven icon in the actions column
- Compose and send your message
- Navigate to Contacts → Organizations
- Find the organization you want to message
- Click the seven icon in the actions column
- Compose and send your message
use Seven\Krayin\Services\SmsService;
$smsService = app(SmsService::class);
// Send SMS to a contact
$smsService->send(
to: '+1234567890',
message: 'Hello {{name}}, your appointment is confirmed!',
contactId: $contact->id
);
Send SMS campaigns to multiple contacts at once:
- Navigate to Contacts → Persons or Organizations
- Select multiple contacts using checkboxes
- Click Bulk Actions → Send SMS
- Compose your message with placeholders
- Review and send
- Test with a small group first
- Use placeholders for personalization
- Monitor delivery reports
- Respect sending limits and regulations
- Schedule campaigns during appropriate hours
Personalize your messages with dynamic placeholders:
Placeholder | Description | Example Output |
---|---|---|
{{name}} |
Contact's full name | John Doe |
{{first_name}} |
First name only | John |
{{last_name}} |
Last name only | Doe |
{{organization}} |
Organization name | Acme Corp |
{{email}} |
Email address | john@example.com |
{{phone}} |
Phone number | +1234567890 |
Hello {{first_name}},
Your appointment at {{organization}} is confirmed for tomorrow at 2 PM.
Best regards,
Your CRM Team
- Check API Key: Verify your seven API key is correctly configured
- Phone Format: Ensure phone numbers include country code (e.g., +1234567890)
- Balance: Check your seven account has sufficient SMS credits
- Logs: Review Laravel logs at
storage/logs/laravel.log
# Reset migrations if needed
php artisan migrate:rollback
php artisan migrate
# Clear all caches
php artisan cache:clear
php artisan config:clear
php artisan view:clear
# Regenerate composer autoload
composer dump-autoload
# Clear bootstrap cache
php artisan optimize:clear
Q: Can I use SMS templates? A: Yes, you can create reusable message templates with placeholders in the admin panel.
Q: Are there sending limits? A: Limits depend on your seven account plan. Check your seven dashboard for details.
Q: Can I track SMS delivery? A: Yes, delivery reports are available in the Performance Tracking section.
Q: How do I test SMS functionality?
A: Use seven's test mode by adding test=1
parameter in your API configuration.
Q: Can I schedule SMS messages? A: Scheduled messaging is planned for a future release.
# Run package tests
php artisan test packages/Seven/Krayin
# Run with coverage
php artisan test --coverage packages/Seven/Krayin
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Need help? We're here to assist!
- 📧 Email: support@seven.io
- 📚 Documentation: seven API Docs
- 💬 Contact: Contact Form
- 🐛 Issues: GitHub Issues
This package is open-source software licensed under the MIT License.
Made with ❤️ by seven