Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages

Guidelines to create integrations

Вы здесь:

Guidelines for development of UniSender and CMS/CRM integration

Mailing campaign

Integration possibilities

The section bellow describes the guidelines for development of a module (plug-in) for CMS & CRM systems that will provide integration between your CMS or CRM system and UniSender.

If you follow the guidelines described below in the development, you will have a module in your system that will enable your users to:

  • register with UniSender or link an existing UniSender account to the module;
  • import email and other lead fields from your system to UniSender for further sending emails to them;
  • create messages for a campaign;
  • send the emails created to the imported email addresses;
  • receive the campaign statistics: the number of delivered and read letters, and the click-through statistics.

If you have any questions regarding this document in the development, or you want to develop an integration that will differ from the one described above, you can contact us at plugins@unisender.com, – and we will provide you with advice.

Guidelines for development in terms of functionalities

When developing integrations, you will use API UniSender.

IMPORTANT

To track users of your integration and diagnose errors that will occur, you need to add the platform parameter in each (!) call of the API method. Parameter values are the name of your system in Latin letters without spaces and special characters, previously agreed on with the manager.

To agree on the parameter, send a request to plugins@unisender.com with a brief description of your system.

Example of a call with this parameter:

The list creation method has the following format GET.

https://api.unisender.com/en/api/createList?format=json&api_key=***&title=***

When calling this method, you need to add a parameter, with which the request is sent.

https://api.unisender.com/en/api/createList?format=json&api_key=***&title=***&platform=MySite

Login of the existing UniSender user

  1. Display the form with the API key field and information on how to get and enable it in UniSender.
  2. When submitting the form, call the getLists method.
  3. If the method returns information about the lists without errors, display the message «You have successfully logged in».
  4. Go to «Selection of the list and additional fields to import contacts».

User registration

  1. Display the form with the Email & Password fields.
  2. When confirming the filling out form, send data from the form fields using the register method.
  3. If the method has been successful, you will receive the API user key.
  4. Save the received API key in your application.
  5. Display the message to the user that the registration has been successful.
  6. Go to «Selection of the list and additional fields to import contacts».

Selection of the list and additional fields to import contacts

  1. Display the «Select a list to import contacts or create a new one», window, which displays the names of the lists obtained using the getLists method and the window to enter the name of the new list.
  2. If the user has selected a list, you should save his id in your system.
  3. If the user has entered the name of the new list, you should create it in UniSender using the createList method and save the id of the list in your system.
  4. Display the «List has been selected» message.
  5. After confirmation that the message has been read, display a window with mapping (matching fields of your system and UniSender) of the contact fields of your system and UniSender. The window should display the fields available for importing from your system and the UniSender fields. UniSender fields can be obtained using the getFields. method. If the user wants to create a new field in UniSender, use the createField createField method.
  6. When mapping the fields, you need to match the field types.
  7. After the fields have been mapped by the user, you need to display a message about the successful completion of mapping.
  8. Go to «Creating a message for a campaign».

We advise you to import contacts immediately before creating a campaign.

Creating a message for a campaign

  1. Getting the list of confirmed user addresses using getCheckedEmail.
  2. If the user wants to send emails from an address that has not been previously confirmed, confirm the sender’s address using the validateSender method.
  3. After calling the validateSender method, display the message «Confirmation letter has been sent to your address, you can send emails from this address after clicking the link».
  4. Creating an email to be sent using the createEmailMessage method. When creating a message, specify the list selected in the «Selection of the list and additional fields to import contacts» step:
    – attachments
    – add attachments. The maximum attachment size is 500 Kb
    – message_format = raw_html
  5. Save the message id received.
  6. Suggest checking the display of the message in the user’s mailbox. If the user agrees, send a test message using the sendTestEmail method.

Mailing campaign on the message created and obtaining statistics

  1. The user can select one of the ways to send the message:
    -immediately;
    – schedule sending.
  2. If the user has confirmed sending, your system should import the contacts into the selected list in the «Selection of the list and additional fields to import contacts» step using the importContacts method.
  3. Call the createCampaign method, in which you should transfer:
    – message_id
    – the identifier of the message created in the «Creating a message for a campaign» step;
    – start_time – set the sending time depending on the selected sending method;
    – contacts_url – the link to the file with contacts to which the messages should be send and which were added using the importContacts (a segment is a part of the imported contacts);
    – track_read = 1;
    – track_links = 1.
  4. Display the message «The campaign has been scheduled successfully».

Getting campaign status and statistics

  1. You can get the current campaign status using the getCampaignStatus.
  2. You can get the campaign statistics using the getCampaignCommonStats.