bellinatiperez / mautic-plugin-bpmessage
Plugin for Mautic to send messages to BP
Installs: 1
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:mautic-plugin
pkg:composer/bellinatiperez/mautic-plugin-bpmessage
README
Implements four distinct campaign actions integrating with Bellinati Perez Message service, maintaining job-based execution, retries, and detailed logging.
Actions
- Messages (batch):
campaign.bpmessage.messages_batch- Endpoints:
GET /api/ServiceSettings/GetRoutes,POST /api/Lot/CreateLot,POST /api/Lot/AddMessageToLot/{idLot},POST /api/Lot/FinishLot/{idLot}
- Endpoints:
- Messages (single):
campaign.bpmessage.messages_single- Endpoint:
POST /api/Message/AddMessageInvoice
- Endpoint:
- Emails (batch):
campaign.bpmessage.emails_batch- Endpoints:
GET /api/ServiceSettings/GetRoutes,POST /api/Email/CreateLot,POST /api/Email/AddEmailToLot/{idLotEmail},POST /api/Email/FinishLot/{idLotEmail}
- Endpoints:
- Emails (single):
campaign.bpmessage.emails_single- Endpoint:
POST /api/Email/AddEmailInvoice
- Endpoint:
Configuration
- Base URL: set in Integration settings as
External service URL(e.g.https://hmlbpmessage.bellinatiperez.com.br). - Default headers, payload template, batch size, batch interval, retry limit, timeout can be set in Integration settings and are merged into action config.
Processing
- Requests execute via queue model
BpMessageModeland entityBpMessageQueue. - Batch actions aggregate payloads using
payload_key = dataand respectbatch_sizeandbatch_interval. - Single actions send one request per queued contact.
- Retry policy increments
retriesup toretry_limit, then discards. - Logs are emitted to the Mautic logger with detailed messages per step and HTTP status.
Business Rules
- Hooks are prepared to apply business rules prior to sending (extend
BpMessageModelmethods to enrich payloads/headers according to/BpMessage_EnvioTESTE3 1 1.pdf).
Backward Compatibility
- Legacy action
campaign.bpmessageremains available and routes to the default messages batch flow.
Notes
- Maintain existing folder structure and namespaces.
- Clear cache after enabling the plugin:
php bin/console cache:clear(both dev and prod if applicable).