Skip to main content

Marketing Campaigns

Send promotional messages and marketing campaigns to engage your customers.

Overview

Use Transformify to run marketing campaigns with:

  • Promotional offers and discounts
  • Product announcements
  • Seasonal campaigns
  • Re-engagement messages
  • Event invitations

Viber Campaigns

Viber is ideal for rich media marketing — images, buttons, and carousels drive higher engagement.

Create a Viber Marketing Template

Promotional Offer (Image + Button):

curl -X POST https://api.transformify.mk/api/v1/templates/viber \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"name": "Flash Sale",
"messageType": 4,
"templateContent": "FLASH SALE!\n\n{{discount}}% OFF everything!\n\nUse code: {{promoCode}}\nValid until {{expiry}}",
"viberServiceId": 12345,
"typeSpecificConfig": "{\"imageUrl\":\"https://yourcdn.com/images/flash-sale-banner.jpg\",\"buttonText\":\"Shop Now\",\"buttonUrl\":\"https://yourstore.com/sale?code={{promoCode}}\"}"
}'

Product Carousel:

curl -X POST https://api.transformify.mk/api/v1/templates/viber \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"name": "New Arrivals Carousel",
"messageType": 5,
"templateContent": "Check out our latest products!",
"viberServiceId": 12345,
"typeSpecificConfig": "{\"items\":[{\"title\":\"Summer Collection\",\"imageUrl\":\"https://yourcdn.com/products/summer.jpg\",\"buttonText\":\"View\",\"buttonUrl\":\"https://yourstore.com/summer\"},{\"title\":\"Best Sellers\",\"imageUrl\":\"https://yourcdn.com/products/bestsellers.jpg\",\"buttonText\":\"View\",\"buttonUrl\":\"https://yourstore.com/bestsellers\"},{\"title\":\"New Arrivals\",\"imageUrl\":\"https://yourcdn.com/products/new.jpg\",\"buttonText\":\"View\",\"buttonUrl\":\"https://yourstore.com/new\"}]}"
}'

Send Viber Bulk Campaign

curl -X POST https://api.transformify.mk/api/v1/viber/send \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"templateId": "flash-sale-template-id",
"recipients": [
{
"phoneNumber": "38970111111",
"placeholders": { "discount": "30", "promoCode": "VIP30" }
},
{
"phoneNumber": "38970222222",
"placeholders": { "discount": "25", "promoCode": "LOYAL25" }
},
{
"phoneNumber": "38970333333",
"placeholders": { "discount": "20", "promoCode": "NEW20" }
}
],
"placeholders": {
"expiry": "January 20, 2024"
}
}'

Each recipient gets their own discount and promo code, while the expiry date is shared across all messages (request-level fallback).

Start delivery after send

Both Viber and SMS bulk sends return status: "Queuing" immediately. Poll GET /api/v1/campaigns/{id} until Ready, then call POST /api/v1/campaigns/{id}/start to begin delivery.

SMS Campaigns

SMS is ideal for text-only promotions — universal reach, no app required.

Create an SMS Marketing Template

curl -X POST https://api.transformify.mk/api/v1/templates/sms \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"name": "Flash Sale SMS",
"templateContent": "FLASH SALE! {{discount}}% OFF everything! Use code {{promoCode}} at checkout. Valid until {{expiry}}. Shop: https://yourstore.com/sale"
}'

Send SMS Promotional Campaign

curl -X POST https://api.transformify.mk/api/v1/sms/promotional \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"templateId": "flash-sale-sms-template-id",
"recipients": [
{
"phoneNumber": "38970111111",
"placeholders": { "discount": "30", "promoCode": "VIP30" }
},
{
"phoneNumber": "38970222222",
"placeholders": { "discount": "25", "promoCode": "LOYAL25" }
}
],
"placeholders": {
"expiry": "January 20, 2024"
}
}'

Track Campaign Performance

Monitor any campaign:

curl -X GET "https://api.transformify.mk/api/v1/campaigns/{campaignId}" \
-H "X-API-Key: your-api-key"

Response:

{
"campaignId": "campaign-id",
"name": "Flash Sale Campaign",
"description": "Sent via SMS API (Promotional) using template Flash Sale SMS",
"status": "Completed",
"channel": "Smpp",
"sendingMode": "Bulk",
"templateId": "template-id",
"templateName": "Flash Sale SMS",
"totalMessages": 10000,
"deliveredCount": 9500,
"seenCount": 0,
"failedCount": 300,
"pendingCount": 200,
"createdAt": "2024-01-15T09:00:00Z",
"startedAt": "2024-01-15T09:00:00Z"
}

Campaign Types

Flash Sales

Time-sensitive promotions with urgency:

{
"templateContent": "24-HOUR FLASH SALE! 50% OFF sitewide! Ends at midnight tonight. Shop: https://yourstore.com/sale"
}

Product Launches

Announce new products:

{
"templateContent": "Introducing the {{productName}}! {{description}}. Be the first to get it: https://yourstore.com/new-product"
}

Re-engagement

Win back inactive customers:

{
"templateContent": "We miss you, {{name}}! It's been a while. Here's {{discount}}% off your next order! Use code: {{promoCode}}"
}

Event Invitations

{
"templateContent": "You're Invited! {{eventName}} on {{date}} at {{location}}. Limited spots — register: https://yoursite.com/events/{{eventId}}"
}

Best Practices

  1. Get consent - Only message customers who opted in
  2. Choose the right channel - Use Viber for rich media, SMS for universal reach
  3. Segment your audience - Send relevant messages to each group
  4. Time it right - Send during peak engagement hours
  5. A/B test - Test different messages and measure results
  6. Include unsubscribe - Provide a way to opt out
  7. Track metrics - Monitor delivery rates and engagement
  8. Respect frequency - Don't over-message your customers