Integration with Reskyt

Integrate your Connectif account with Reskyt to send native push notifications through the application.

In this article, you will learn how to integrate your Connectif account with Reskyt to track contact activity and see an example of a workflow where a push notification is sent to Reskyt. 

  

Implementation time: 1 hour.
Difficulty: Intermediate
When to use it?:
To send push notifications through the application.

 

This is just one example of the many possibilities that this integration offers. By following the basic principles explained in this article, you can create additional push notification strategies to help you achieve your goals.

 

Why implement the extension

1. Use cases you can create after this integration

Here are some ideas that can help you implement different strategies in the Reskyt application after activating the Reskyt extension in your Connectif Store.

  • Recover abandoned carts.
  • Execute remarketing strategies through Reskyt push notifications.
  • Send birthday greetings to contacts.
  • Send a discount for the first purchase anniversary.

 

2. What can you do with Connectif in Reskyt?

With this extension, you can use Connectif to create automated strategies for sending push notifications via the Reskyt app.

Additionally, you will be able to track contact activity in Reskyt.

3. What Connectif data can you use in Reskyt?

Likewise, in Reskyt, you can leverage all the information collected in the Contact Sheet, as well as real-time activity, to personalize notifications with Connectif contact data.

 

 

Before you start: what to consider

To integrate your Connectif account with Reskyt and automate the sending of native push notifications, you will need:

  • Request Reskyt to activate the API and provide its value,  so you can use it.

Additionally, keep in mind some properties of mobile push notifications sent via Reskyt:

  • It is not possible to unsubscribe a contact from these notifications, as there is no mechanism to notify in case of delivery failure.
  • Mobile push notifications do not have statistics or analytics on sends, opens, or clicks. 
    • The number of clicks could be tracked using UTM options in the link, but this is not a default collected value.
  • The contact will have a maximum of one device, as only one token can be stored in the custom field.
  • Two or more contacts may have the same Reskyt token, as they could, for example, log in to multiple sessions on the same device. 

 

STEP 1: Creating the custom field to store the Reskyt token 

(In this section, a custom field will be created to store the Reskyt token, which serves as the contact's identifier in the App.).  

1. Navigate to "Contacts > Contact Fields" and click on     Add new custom field.

Integration with Reskyt - 1-min.png

2. Assign it the type Text and click on Go to editor.

Integration with Reskyt - 2-min.png

3. Assign it a Name and the ID "reskyt-token" and click on   Save.

 

For the integration to work and for the token to be stored in Connectif, it is important that the custom field has this name and ID.

Integration with Reskyt - 3 (1)-min.png

 

STEP 2: Creating the workflow to collect the contact's token  

(In this section, a workflow will be created to collect the contact's activity during their navigation through the Reskyt app and update the custom field in Connectif that was created in STEP 1. This activity will be collected through a script inserted into Reskyt via an inline method.)

4. Navigate to Workflows and click on     Create new workflow.

Integration with Spoki 2023 - 6-min.png

5. Select a new blank workflow.

6. In the "Start Node", select All contacts from my list.

7. Add the trigger node "On page visit" so the workflow activates when a contact visits the website. In the node configuration, under the Limitations tab, remove all limitations.

Integration with Reskyt - 4-min.png

8. Add a condition node "Check value" and enter the node editor.

9. In the configuration of the "Check value" node, select the User Agent operator, obtained from the "On page visit" node, and drag it to the left column of the central panel.

Integration with Reskyt - 5-min.png

10. From the right column, select the value Literal and drag it to the right column of the central panel. Then, enter the text "rktwebview" in that value.

  

The value we specify is the default value assigned by Reskyt. You can modify it, but if you do, you must enter the assigned value in this field instead of "rktwebview".

Integration with Reskyt - 6-min.png

11. Click on   Update.

  

This way, Connectif will verify that during navigation, the page contains the value "rktwebview" in the User Agent parameter. This information is provided directly by Reskyt to indicate that a contact is browsing through its application.

12. Add the action node "Send web content" to insert the Script that will track the contact's activity on Reskyt.

13. Do not edit the connection between this node and the "Check value" node, so that "Yes" appears.

Integration with Reskyt - 7-min.png

14. Click on  (Edit node settings) of the “Send web content” node and   Create new content to generate new content.

15. When creating new content, select the type Inline, assign it a name, for example "Script Reskyt", and click on   Create new content

16. Add an HTML component and edit it by copying and pasting the following code:

<script>
(function connectifReskyt(global) {

  if (global.connectif &&

      global.connectif.managed &&

      global.connectif.managed.isInitialized()) {

    getReskytToken();

  } else {

    global.document.addEventListener(

      "connectif.managed.initialized",

      function onConnectifInitialized() {

        getReskytToken();

      }

    );

  }

  function getReskytToken() {

    var reskytToken = getCookie("token_md5") || "";

  var previousReskytToken = global.sessionStorage.getItem("cn_reskyt_token");

    if (reskytToken !== previousReskytToken) {

      global.connectif.managed.sendEvents([], {

        entityInfo: { "reskyt-token": reskytToken },

        onResponded: function onResponded() {

          global.sessionStorage.setItem("cn_reskyt_token", reskytToken);

        }

      });

    }

  }

  function getCookie(name) {

    var value = "; " + global.document.cookie;

    var parts = value.split("; " + name + "=");

    if (parts.length === 2) return parts.pop().split(";").shift();

  }

})(window);
</script>
  

This Script collects the Reskyt token from a cookie and stores it in the custom field "reskyt-token".

Integration with Reskyt - 8-min.png

17. Click on  Save to save the changes and then on   Return to selector to go back and finalize the node configuration.

18. Once you have selected the Inline content you just created, click on Next .

Integration with Reskyt - 9-min.png

19. In Configuration, add the appropriate selector to display the content. In this case, it is recommended to include the content on the product page or another page that renders both on the web and in the App.

Integration with Reskyt - 10-min.png

20. In the Limitations tab, remove all node limitations. Finally, click on Finish to save the node configuration.

21. Save and activate the Workflow.

 

STEP 3: Creating the data sending event to display pushes in Reskyt

(In this section, an event will be created that sends information from Connectif to Reskyt to enable push notifications within the App.)

22. Go to Store Settings in the left side menu.

23. In the tab selector, navigate to "Integrations > Custom Integrations (webhooks)" and click on   Create new integration.

Integration with Spoki 2023 - 0-min.png

24. Set the field "Integration Name" to identify the integration and click on  Update.

25. In the Send Data tab, click on   Create new sending event.

26. Within this screen, assign a name to the event.

27. In the field Webhook URL to send the message, paste the API URL of Reskyt for sending push notifications. In this case, the URL is "https://push.api.reskyt.com/push/send".

 

If you need more information about the Reskyt API, access its documentation.

Integration with Reskyt - 16-min.png

28. Click on Add a new header and assign it the Name "x-api-key" and, in the Value field, enter the API key provided by Reskyt.

 
 

You must request this value from Reskyt, as well as the activation of their API, in order to use it.

Integration with Reskyt - 11-min.png

29. Click on   Add a new field to create each of the custom fields and complete their information:

  • Create a field with the name and ID "dateEnd" of type Text.

Although it is not mandatory to add the expiration date, it is recommended for strategies where you want to send a push notification about an offer and ensure that it stops sending once the offer ends.

  • Create a field with the name and ID "pictureUrl" of type Text.
  • Create a field with the name and ID "title" of type Text  and mark it as mandatory.
  • Create a field with the name and ID "tokens" of type Text and mark it as mandatory. Enable JSON options and assign it the parameter "/tokens/0".

Integration with Reskyt - 15-min.png

  • Create a field with the name and ID "url" of type Text.
  • Create a field with the name and ID "utmCampaign" of type Text.

Integration with Reskyt - 12-min.png

30. Click on  Save.

 

STEP 4: Creating the workflow to send a push notification in Reskyt

(In this section, we will create the strategy to send a push notification to the Reskyt app.)

 

We recommend creating a Dynamic Plus Segment to filter out contacts whose reskyt-token custom field is empty. This way, the strategy will only activate for Reskyt contacts, preventing Connectif from searching through your entire contact base.

31. Navigate to Workflows and click on     Create new workflow and select a New blank workflow.

Integration with Spoki 2023 - 6-min.png

32. In the "Start Node", select the Dynamic Plus Segment you created to filter Reskyt contacts. 

34. Find the action node you created when setting up your integration with Reskyt (step 3) and add it to your workflow.

Integration with Reskyt - 13-min.png

35. In the node configuration, drag the "reskyt-token" field from the contact's information and match it with the "Tokens" value on the right column. Associate the remaining values with a Literal field to structure the push notification content in Reskyt.

 

The dateEnd field must be in Timestamp format. You can use this converter to obtain the correct date format. Additionally, Reskyt sets a limit of 2 months after sending.

Integration with Reskyt - 14-min.png

36. Click on  Update to save the node configuration and activate your workflow.

 

 

Success!
Your Connectif account integration with Reskyt is now ready.

 


Keep learning!

To fully utilize your Connectif account, we recommend continuing with the following articles: