Campaign Studio

Solver AI Suite is a API first platform that enables you to integrate and it through Rest API. If you tend to use Campaign Studio through API you can find below examples and way through for smooth integration and usage of advanced functionalities:

Before attempt to create a campaign, you should consider next features and based on that, to build your payload:

  1. What channel you plan to use for communication:
    • Email
    • Viber
    • SMS
    • Fallback (Viber to SMS)
  2. What audience should receive your campaign:
    • All customers
    • Automatically generated based on segments
    • Manually created through segmentation studio
    • Uploaded
  3. Will this campaign be recurring and repeat on some occurrences?
    • None
    • Daily
    • Weekly
    • Monthly
  4. Should you create A/B testing (even C):
    • With SAIS Campaign Studio you can create three groups with different content
  5. UTMs for easier campaign analytics tracking:
    • Campaign id
    • Campaign name
    • Customer id
    • Channel
    • ABC group
  6. What placeholders and images you can use:
    • You can use customer's first name, last name, vocative name. Also, you can use the top 5 recommended products and their names.
    • For Viber messages, you can use custom-made images for each product in the special offer (additional data integration required)
    • For email, you can use raw product images, in case `item_image_url` is included in data integration
 curl -X POST "https://{env}.thingsolver.com/api/latest/campaigning-studio/campaignings/" \
 -H "Content-Type: application/json" \
 -d '{
     "audiences":["Rfmt_3"],
     "audiences_type":"GENERIC",
     "campaign_name":"My 1st campaign",
     "is_abc":true,
     "sender":"",
     "is_draft":false,
     "is_approved":false,
     "recurring":{
        "recurring_frequency":null,
        "recurring_until":null,
        "is_recurring":false
     },
     "author":"Sinisa",
     "channel_type":"viber",
     "campaign_details":[
        {
           "channel_button":"Click!",
           "channel_message_text":"Hi {ph_customer.first_name} ,\n\nTake a look at our newest offer!",
           "channel_fallback_message_text":"Hi {ph_customer.first_name} , take a look at our new offer!",
           "channel_button_link":"https://www.thingsolver.com",
           "channel_image_url":"https://www.thingsolver.com/image",
           "channel_validity_period":24,
           "channel_validity_unit":"HOURS",
           "html_template_id":"",
           "start_time":"2023-09-18T10:15:00",
           "end_time":"2023-09-25T10:15:00",
           "send_promotion_time":"2023-09-18T12:15:00",
           "tags":[],
           "is_personalized":true,
           "channel_subject":"",
           "abc_audience_percent":70,
           "recommended_products":[],
           "urls_to_short":[],
           "utm":["campaign_id","campaign_name","customer_id","channel","abc_group"],
        },
        {
           "channel_button":"",
           "channel_message_text":"",
           "channel_fallback_message_text":"",
           "channel_button_link":"",
           "channel_image_url":"",
           "channel_validity_period":null,
           "channel_validity_unit":null,
           "html_template_id":"",
           "start_time":"2023-09-18T10:15:00",
           "end_time":"2023-09-25T10:15:00",
           "send_promotion_time":"2023-09-18T12:15:00",
           "tags":["skip-content"],
           "is_personalized":false,
           "channel_subject":"",
           "abc_audience_percent":30,
           "urls_to_short":[],
           "utm":[],
        }
     ]
  }'
  {
     "campaign_name":"My 1st campaign",
     "date_created":"2023-09-18T08:07:46",
     "date_modified":"2023-09-18T08:07:46",
     "is_approved":false,
     "is_approved_by_user":false,
     "channel_type":"viber",
     "approved_by":[

     ],
     "approvals_left":1,
     "required_approvals":1,
     "audiences":[
        "Rfmt_3"
     ],
     "audiences_type":"GENERIC",
     "sender":"",
     "author":"Sinisa",
     "is_draft":false,
     "is_abc":true,
     "recurring":{
        "recurring_frequency":null,
        "recurring_until":null,
        "is_recurring":false
     },
     "campaign_details":[
        {
           "is_personalized":true,
           "end_time":"2023-09-25T10:15:00",
           "start_time":"2023-09-18T10:15:00",
           "send_promotion_time":"2023-09-18T12:15:00",
           "channel_image_url":"https://www.thingsolver.com/image",
           "tags":[

           ],
           "channel_subject":"",
           "channel_message_text":"Hi {ph_customer.first_name} ,\n\nTake a look at our newest offer!",
           "channel_fallback_message_text":"Hi {ph_customer.first_name} , take a look at our new offer!",
           "channel_button":"Click!",
           "channel_button_link":"https://www.thingsolver.com",
           "channel_fallback_validity_unit":"HOURS",
           "channel_validity_unit":"HOURS",
           "channel_validity_period":24,
           "urls_to_short":[

           ],
           "utm":[
              "campaign_id",
              "campaign_name",
              "customer_id",
              "channel",
              "abc_group"
           ],
           "html_template_id":"",
           "abc_audience_percent":70,
           "channel_fallback_validity_period":24,
           "recommended_products":[

           ],
           "campaign_id":"2023-09-18_cn_my_1st_campaign_cl_dev_ap_70_ag_1",
           "is_sent":false,
           "sending_status":"Not Sent",
           "fail_reason":null
        },
        {
           "is_personalized":false,
           "end_time":"2023-09-25T10:15:00",
           "start_time":"2023-09-18T10:15:00",
           "send_promotion_time":"2023-09-18T12:15:00",
           "channel_image_url":"",
           "tags":[
              "skip-content"
           ],
           "channel_subject":"",
           "channel_message_text":"",
           "channel_fallback_message_text":"",
           "channel_button":"",
           "channel_button_link":"",
           "channel_fallback_validity_unit":"HOURS",
           "channel_validity_unit":null,
           "channel_validity_period":null,
           "urls_to_short":[

           ],
           "utm":[

           ],
           "html_template_id":"",
           "abc_audience_percent":30,
           "channel_fallback_validity_period":24,
           "recommended_products":[

           ],
           "campaign_id":"2023-09-18_cn_my_1st_campaign_cl_dev_ap_30_ag_2",
           "is_sent":false,
           "sending_status":"Not Sent",
           "fail_reason":null
        }
     ]
  }

Description from request from above:

  1. What channel you plan to use for communication:
    • Fallback (Viber to SMS)
  2. What audience should receive your campaign:
    • Automatically generated based on segments (Rfmt_3)
  3. Will this campaign be recurring and repeat on some occurrences?
    • None
  4. Should you create A/B testing (even C):
    • With SAIS Campaign Studio you can create three groups with different content
  5. UTMs for easier campaign analytics tracking:
    • Campaign id
    • Campaign name
    • Customer id
    • Channel
    • ABC group
  6. What placeholders and images you can use:
    • Customer's first name {ph_customer.first_name}

After campaign is created, there is a requirement to approve campaign prior sending.

  curl -X PUT "https://dev.thingsolver.com/api/latest/campaigning-studio/campaignings/2023-09-18_cn_my_1st_campaign_cl_dev_ap_70_ag_1/approve"
  {
     "detail":"Campaign successfully approved."
  }

Approve condition

Approve can be executed only and only by advanced or super users.

Also, alongside approving campaign, instant sending is another features that can be executed by advanced or super users. And that can be done using next route:

  curl -X POST "https://dev.thingsolver.com/api/latest/campaigning-studio/campaignings/send-instant"
  {
     "status_code": 200,
     "message": "Instant campaign sending has been triggered."
  }

After this point, there is nothing to do more except wait for campaign to be prepared and sent. Later on, you can check status and reports for campaign deliverability.

Statuses: - Not approved - Approved - Preparing - Sending - Sent - Not sent

Deliverability you can see using below endpoints:

  curl -X GET "https://dev.thingsolver.com/api/latest/campaigning-studio/insights/delivery-report"
  {
     "campaigns": [{"campaign_name": "My 1st campaign", 
     "metrics": {"targeted": "25200", 
                 "delivered": 12050, 
                 "clicked": 2050, 
                 "opened": 8675, 
                 "subscription": 45,
                 "bounce": 88,
                 "complaint": 14,
                 "percent_delivered": 49.0,
                 "percent_clicked": 7.2,
                 "percent_open": 30.78,
                 "percent_subscription": 0.22,
                 "percent_bounce": 0.09,
                 "percent_complaint": 0.005,
                 }},
     {"campaign_name": "My 2nd campaign", 
     "metrics": {"targeted": "25200", 
                 "delivered": 12050, 
                 "clicked": 2050, 
                 "opened": 8675, 
                 "subscription": 45,
                 "bounce": 88,
                 "complaint": 14,
                 "percent_delivered": 49.0,
                 "percent_clicked": 7.2,
                 "percent_open": 30.78,
                 "percent_subscription": 0.22,
                 "percent_bounce": 0.09,
                 "percent_complaint": 0.005,
                 }}]
  }
Back to top