Skip to content

Rokt Calendar

Rokt Calendar is a dynamic calendar marketing technology that enables brands to push 1:1 events and promotional communications in the form of calendar events and notifications.

The Braze and Rokt Calendar integration allows your Rokt Calendar subscribers and their data to be pushed to Braze via Braze webhook. You can then use this data in Braze Canvases for journey targeting and audience segmentation using any of the following custom Rokt Calendar attributes.

Prerequisites

Audience segmentation

When Rokt Calendar creates a new user or matches an existing subscriber with a Braze user, Rokt Calendar will send the following custom subscription attributes you can filter within Braze:

Rokt Calendar will also trigger a subscribe custom event as soon as the user has subscribed to your Rokt calendar that can be used either in Braze segmentation or be used as a trigger for a campaign or Canvas component.

Integration

Step 1: Building an audience of calendar subscribers

To send calendar events from Canvas, you must first have a Rokt calendar setup with users already subscribed. To do this, you will need to inform your users where and how to subscribe to the calendar. Rokt Calendar recommends that you:

Provide subscription integration points

To build an audience of calendar subscribers, you will need to offer a destination to which a user can navigate and subscribe. Some subscription integration point examples include:

  • Add a calendar button to your website
  • Adding a calendar link in an email or SMS
  • Add a calendar button to your app
  • Add a calendar link on social media

Promote the calendar

To build an audience of subscribers, you’ll need to promote the calendar to your audience so that they know how to subscribe. Some calendar promotion examples include:

  • Posts on social media
  • Email newsletters and updates
  • Blog posts
  • In-app notifications

Step 2: Create a Rokt Calendar webhook in Braze

Within Braze, you can set up a webhook campaign or a webhook within a Canvas to either:

  • Send a new personalized event: Allow new events to be added to a segment of subscribers’ calendars.
  • Update a personalized event: Allow for an update to be made to an existing event in subscribers’ calendars.

To create a Rokt Calendar webhook template to use in future campaigns or Canvases, navigate to Templates > Webhook Templates in the Braze platform.

If you would like to create a one-off Rokt Calendar webhook campaign or use an existing template, select Webhook in Braze when creating a new campaign.

Once you have selected the Rokt Calendar webhook template, you should see the following:

  • Webhook URL: {% assign accountCode = {{custom_attribute.${rokt:account_code}}}[0] | split: '/' | first %}https://api.roktcalendar.com/v1/subscriptionevent/{{accountCode}}
  • Request Body: Raw Text

Once you have selected the Rokt Calendar webhook template, you should see the following:

  • Webhook URL: {% assign accountCode = {{custom_attribute.${rokt:account_code}}}[0] | split: '/' | first %}https://api.roktcalendar.com/v1/subscriptionevent/{{accountCode}}/update
  • Request Body: Raw Text

Request headers and method

Rokt Calendar requires an HTTP Header for authorization that includes your Rokt Calendar Connected Content credential name. The following will already be included within the template as key-value pairs, but in the Settings tab, you must replace <Rokt-Calendar-API> with the credential name found in Manage Settings > Connected Content > Credential.

  • HTTP Method: POST
  • Request Header:
    • Authorization: Bearer {% connected_content https://api.roktcalendar.com/oauth2/token :method post :basic_auth <Rokt-Calendar-API> :body grant_type=client_credentials :save token :retry %}{{token.access_token}}
    • Content-Type: application/json

Request body

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{% capture eventId %}Event_0001{% endcapture %}
{% capture eventTitle %}Event Title{% endcapture %}
{% capture eventDescr %}Event Description{% endcapture %}
{% capture eventLocation %}Event Location{% endcapture %}
{% capture eventStart %}2019-02-21T15:00:00{% endcapture %}
{% capture eventEnd %}2019-02-21T15:00:00{% endcapture %}
{% capture notifyBefore %}15{% endcapture %}
{% capture eventTZ %}Eastern Standard Time{% endcapture %}

{
  "event": {
    "eventId": "{{eventId}}_{{${user_id}}}",
    "title": "{{eventTitle}}",
    "description": "{{eventDescr}}",
    "location": "{{eventLocation}}",
    "start": "{{eventStart}}",
    "end": "{{eventEnd}}",
    "timezone": "{{eventTZ}}",
    "notifyBefore": "{{notifyBefore}}"
  },
  "subscriptionIds": ["{{custom_attribute.${rokt:subscription_id}| join: '","'  }}"]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{% capture eventId %}Event_0001{% endcapture %}
{% capture eventTitle %}Event Title{% endcapture %}
{% capture eventDescr %}Event Description{% endcapture %}
{% capture eventLocation %}Event Location{% endcapture %}
{% capture eventStart %}2019-02-21T15:00:00{% endcapture %}
{% capture eventEnd %}2019-02-21T15:00:00{% endcapture %}
{% capture notifyBefore %}15{% endcapture %}
{% capture eventTZ %}Eastern Standard Time{% endcapture %}

{
  "event": {
    "eventId": "{{eventId}}_{{${user_id}}}",
    "title": "{{eventTitle}}",
    "description": "{{eventDescr}}",
    "location": "{{eventLocation}}",
    "start": "{{eventStart}}",
    "end": "{{eventEnd}}",
    "timezone": "{{eventTZ}}",
    "notifyBefore": "{{notifyBefore}}"
  }
}

The following fields include information that can be customized at the event level.

Step 3: Preview your request

Preview your request in the Preview panel or navigate to the Test tab, where you can select a random user, an existing user, or customize your own to test your webhook.

HOW HELPFUL WAS THIS PAGE?
New Stuff!