Interface Inx_Api_Action_Action

Description

An Inx_Api_Action_Action is a powerful tool which can manipulate or send a mail to a recipient for which an event has occurred. when the event occurs. for example, be configured to respond automatically to flame mails.

An Inx_Api_Action_Action is a powerful tool which can manipulate or send a mail to a recipient for which an event has occurred. To do so, an Inx_Api_Action_Action has a list of commands that will be executed when the event occurs. Using this pattern, complex actions may be created. An Inx_Api_Action_Action could, for example, be configured to respond automatically to flame mails. Inx_Api_Action_Actions can be accessed using the Inx_Api_Action_ActionManager.

The different types of commands are:

  • Inx_Api_Action_DeleteRecipientCommand - Permanently remove the recipient.
  • Inx_Api_Action_SendMailCommand - Send a mailing to the recipient.
  • Inx_Api_Action_SendActionMailCommand - Send an action mailing to the recipient.
  • Inx_Api_Action_SetValueCommand - Set an attribute value of the recipient.
  • Inx_Api_Action_SubscriptionCommand - Subscribe the recipient.
  • Inx_Api_Action_UnsubscriptionCommand - Unsubscribe the recipient.
These commands are created by the Inx_Api_Action_CommandFactory which can be obtained from the Inx_Api_Action_ActionManager.

There are different event types which are triggered by inxmail.

System-wide events (the owner is the SystemListContext):

  • EVENT_TYPE_CLICK - A link in an email is clicked.
  • EVENT_TYPE_HARD_BOUNCE - A hard bounce mail is received.
  • EVENT_TYPE_SOFT_BOUNCE - A soft bounce mail is received.
  • EVENT_TYPE_UNKNOWN_BOUNCE - An unknown mail is detected through the bounce mailbox.
  • EVENT_TYPE_AUTO_RESPONDER_BOUNCE - An auto-responder mail is received through the bounce mailbox.
  • EVENT_TYPE_AUTO_RESPONDER_REPLY - An auto-responder mail is received through the normal mailbox.
  • EVENT_TYPE_FLAME_REPLY - A flame mail is received through the normal mailbox.
  • EVENT_TYPE_UNKNOWN_REPLY - An unknown mail is detected through the normal mailbox.

ListContext-specific events (the owner is a StandardListContext or a FilterListContext):

  • EVENT_TYPE_NEWSLETTER_SENT - A newsletter was sent.
  • EVENT_TYPE_SINGLE_MAIL_SENT - A single mail was sent.
  • EVENT_TYPE_SUBSCRIBE - A recipient was successfully subscribed.
  • EVENT_TYPE_UNSUBSCRIBE - A recipient was successfully unsubscribed.

Note: The usage of Inx_Api_Action_Actions requires the api user right: Inx_Api_UserRights::ACTION_FEATURE_USE

For an example on how to use actions, see the Inx_Api_Action_ActionManager documentation.

Located in /Api/Action/Action.php (line 59)

Inx_Api_BusinessObject
   |
   --Inx_Api_Action_Action
Class Constant Summary
Method Summary
array getCommands ()
int getEventType ()
string getName ()
void updateCommands (array $aCmds)
void updateEventType (int $iEventType)
void updateName (string $sName)
Methods
getCommands (line 173)

Returns the commands this action will execute on the specified event.

Returns the commands this action will execute on the specified event.

  • return: the commands.
  • access: public
array getCommands ()
getEventType (line 156)

Returns the event type of this action.

Returns the event type of this action. Can be one of the event type constants defined in the

  1. Action
interface.

  • return: the event type.
  • access: public
int getEventType ()
getListContextId (line 147)

Returns the id of the list context which this action belongs to.

Returns the id of the list context which this action belongs to.

  • return: the id of the list context which this action belongs to.
  • access: public
int getListContextId ()
getName (line 128)

Returns the unique name of this action.

Returns the unique name of this action.

  • return: the unique name of this action.
  • access: public
string getName ()
updateCommands (line 181)

Sets the commands this action will execute on the specified event.

Sets the commands this action will execute on the specified event.

  • access: public
void updateCommands (array $aCmds)
  • array $aCmds: the commands.
updateEventType (line 165)

Sets the event type of this action.

Sets the event type of this action. Can be one of the event type constants defined in the

  1. Action
interface.

  • access: public
void updateEventType (int $iEventType)
  • int $iEventType: the event type.
updateName (line 139)

Sets the name of this action. Please note, that as of Inxmail Professional version 4. action will cause an Inx_Api_UpdateException to be thrown on commit. name that is already in use also triggers an Inx_Api_UpdateException.

Sets the name of this action.
Please note, that as of Inxmail Professional version 4.4.1, creating an action with the same name as an existing action will cause an Inx_Api_UpdateException to be thrown on commit. Updating an existing action to a new name that is already in use also triggers an Inx_Api_UpdateException.

  • access: public
void updateName (string $sName)
  • string $sName: the unique name of this action.

Inherited Methods

Inherited From Inx_Api_BusinessObject

Inx_Api_BusinessObject::commitUpdate()
Inx_Api_BusinessObject::getId()
Inx_Api_BusinessObject::reload()
Class Constants
ATTRIBUTE_COMMANDS = 3 (line 83)

Constant for the commands attribute.

Constant for the commands attribute. Used by the

  1. UpdateException
to indicate the error source.

ATTRIBUTE_EVENT_TYPE = 1 (line 71)

Constant for the event type attribute.

Constant for the event type attribute. Used by the

  1. UpdateException
to indicate the error source.

ATTRIBUTE_LIST_CONTEXT_ID = 2 (line 77)

Constant for the list context attribute.

Constant for the list context attribute. Used by the

  1. UpdateException
to indicate the error source.

ATTRIBUTE_NAME = 0 (line 65)

Constant for the name attribute.

Constant for the name attribute. Used by the

  1. UpdateException
to indicate the error source.

EVENT_TYPE_AUTO_RESPONDER_BOUNCE = 23 (line 105)

Constant for event type: AUTO_RESPONDER_BOUNCE - An auto-responder mail is received through the bounce mailbox.

Constant for event type: AUTO_RESPONDER_BOUNCE - An auto-responder mail is received through the bounce mailbox.

EVENT_TYPE_AUTO_RESPONDER_REPLY = 30 (line 108)

Constant for event type: AUTO_RESPONDER_REPLY - An auto-responder mail is received through the normal mailbox.

Constant for event type: AUTO_RESPONDER_REPLY - An auto-responder mail is received through the normal mailbox.

EVENT_TYPE_CLICK = 1 (line 87)

Constant for event type: CLICK - A link in an email is clicked.

Constant for event type: CLICK - A link in an email is clicked.

EVENT_TYPE_FLAME_REPLY = 31 (line 111)

Constant for event type: FLAME_REPLY - A flame mail is received through the normal mailbox.

Constant for event type: FLAME_REPLY - A flame mail is received through the normal mailbox.

EVENT_TYPE_HARD_BOUNCE = 20 (line 96)

Constant for event type: HARD_BOUNCE - A hard bounce mail is received.

Constant for event type: HARD_BOUNCE - A hard bounce mail is received.

EVENT_TYPE_NEWSLETTER_SENT = 10 (line 90)

Constant for event type: NEWSLETTER_SENT - A newsletter was sent.

Constant for event type: NEWSLETTER_SENT - A newsletter was sent.

EVENT_TYPE_SINGLE_MAIL_SENT = 11 (line 93)

Constant for event type: SINGLE_MAIL_SENT - A single mail was sent.

Constant for event type: SINGLE_MAIL_SENT - A single mail was sent.

EVENT_TYPE_SOFT_BOUNCE = 21 (line 99)

Constant for event type: SOFT_BOUNCE - A soft bounce mail is received.

Constant for event type: SOFT_BOUNCE - A soft bounce mail is received.

EVENT_TYPE_SUBSCRIBE = 40 (line 117)

Constant for event type: SUBSCRIBE - A recipient was successfully subscribed.

Constant for event type: SUBSCRIBE - A recipient was successfully subscribed.

EVENT_TYPE_UNKNOWN_BOUNCE = 22 (line 102)

Constant for event type: UNKNOWN_BOUNCE - An unknown mail is detected through the bounce mailbox.

Constant for event type: UNKNOWN_BOUNCE - An unknown mail is detected through the bounce mailbox.

EVENT_TYPE_UNKNOWN_REPLY = 32 (line 114)

Constant for event type: UNKNOWN_REPLY - An unknown mail is detected through the normal mailbox.

Constant for event type: UNKNOWN_REPLY - An unknown mail is detected through the normal mailbox.

EVENT_TYPE_UNSUBSCRIBE = 41 (line 120)

Constant for event type: UNSUBSCRIBE - A recipient was successfully unsubscribed.

Constant for event type: UNSUBSCRIBE - A recipient was successfully unsubscribed.

Documentation generated on Thu, 17 Sep 2015 14:27:19 +0200 by phpDocumentor 1.3.2