Interspire transactional message API

We have extended Interspire API functionality in order to allow sending transactional messages; those messages can be email or SMS (for sending transactional SMS you have to have SMS addon on your Interspire installation).

There are 2 kinds of transactional messages:

  • Messages without tracking
  • Messages with tracking

Messages without tracking

That kind of message is used for sending alert that doesn’t need to be track open, link click or bounce.

Messages with tracking

That kind of message is used for sending alert that needs to be track open, link click or bounce.

 

Example email messages without tracking

Multipart message (text/HTML), with the message defined on the XML request

<xmlrequest>

<username>'.$username.'</username>

<usertoken>'.$token.'</usertoken>

<requesttype>advanced_send</requesttype>

<requestmethod>SendEmailNoTracking</requestmethod>

<details>

<email>email@gmail.com</email>

<listid>1</listid>

<subject>SendEmailNoTracking - Body:HTML + TXT</subject>

<messagehtml><![CDATA[

<html><head></head><body>insert here raw html</body></html>

]]></messagehtml>

<messagetxt>insert here raw text</messagetxt>

</details>

</xmlrequest>

 

If we only want to send email text messages, we have to use the tag  <messagetxt>.

<xmlrequest>

<username>'.$username.'</username>

<usertoken>'.$token.'</usertoken>

<requesttype>advanced_send</requesttype>

<requestmethod>SendEmailNoTracking</requestmethod>

<details>

<email>email@gmail.com</email>

<listid>1</listid>

<subject>SendEmailNoTracking - Body:TXT</subject>

<messagetxt>insert here raw text</messagetxt>

</details>

</xmlrequest>

 

If we only want to send email HTML messages, we have to use the tag  <messagehtml>.

<xmlrequest>

<username>'.$username.'</username>

<usertoken>'.$token.'</usertoken>

<requesttype>advanced_send</requesttype>

<requestmethod>SendEmailNoTracking</requestmethod>

<details>

<email>email@gmail.com</email>

<listid>1</listid>

<subject>SendEmailNoTracking - Body_ HTML</subject>

<messagehtml><![CDATA[

<html><head></head><body>insert here raw html</body></html>

]]></messagehtml>

</details>

</xmlrequest>

 

We can also use a template from Interspire to send the message. Instead of inserting the HTML message inside the XML call, we only have to define the campaign id using <newsletterid>.

<xmlrequest>

<username>'.$username.'</username>

<usertoken>'.$token.'</usertoken>

<requesttype>advanced_send</requesttype>

<requestmethod>SendEmailNoTracking</requestmethod>

<details>

<email>email@gmail.com</email>

<listid>1</listid>

<newsletterid>1</newsletterid>

</details>

</xmlrequest>

 

Email messages with tracking

 

On tracking messages we can use custom fields. The information on custom field is displayed on the newsletter with custom field information, but also on the field of the contact.

<xmlrequest>

<username>'.$username.'</username>

<usertoken>'.$token.'</usertoken>

<requesttype>advanced_send</requesttype>

<requestmethod>SendEmailWithTracking</requestmethod>

<details>

<email>email@gmail.com</email>

<listid>1</listid>

<newsletterid>2</newsletterid>

<fields>

<fieldid>12</fieldid>

<data>Content of custom field</data>

</fields>

</details>

</xmlrequest>

 

</xmlrequest>

 

In order to send transactional messages with tracking, first you have to create a campaign and send it to a test list. Then you have to allow that campaign to send transactional messages. You have to go to “View Email Campaigns\View Scheduled Email Queue”.

SMS message without tracking

Example XML

  1. <xml request>
  2. <username>USERNAME</username>
  3. <usertoken>TOKEN</usertoken>
  4. <requesttype>advanced_send</requesttype>
  5. <requestmethod>SendSmsNoTracking</requestmethod>
  6. <details>
  7. <listids>
  8. 2
  9. </listids>
  10. <Email>
  11. user@gmail.com
  12. </Email>
  13. <Cellphone>
  14. 34677934019
  15. </Cellphone>
  16. <Message>Write your message here
  17. </Message>
  18. </details>
  19. </xml requet>

 

Despite the API will check the maximum message size (160 characters) is good to have some kind of control before send message to avoid rejections.

Custom fields are not used on transactional SMS without tracking.

 

SMS transaccional message with tracking

Ejemplo XML<xmlrequest>

<xmlrequest>

<username>'.$username.'</username>

<usertoken>'.$token.'</usertoken>

<requesttype>advanced_send</requesttype>

<requestmethod>SendSmsWithTracking</requestmethod>

<details>

<newsletterid>71</newsletterid>

<email>email@gmail.com</email>

<listid>159</listid>

<message>Only use for keep control of message sent. We use "newsletterid" to manage template content </message>

<cellphone>34677934019</cellphone>

<fields>

<fieldid>2</fieldid>

<data>Content custom field</data>

</fields>

</details>

</xmlrequest>

In order to define transactional templates we must mark transactional campaign using “Email Campaigns/Campaign queue” action link.

 

 

 

¿Tiene más preguntas? Enviar una solicitud

0 Comentarios

El artículo está cerrado para comentarios.
Tecnología de Zendesk