Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

notification of the campaign(s) status changes

 

Redis

Type

PubSub

Key

enigma:notifications:campaigns:<campaign_ref>

Payload

  • type: status
  • payload: <notif>
  • status: <status> campaign status
  • ref:

     


    Code Block
    languagejs
    //Notification Example
    psubscribe enigma:notifications:campaigns:*
    {
        type: "status",
        payload: {
            status: <status>,
            ref   : <campaign_ref>
        }
    }
    • <status> campaign status
    • <campaign_ref> campaign reference

    Values:

    <status>

    The new campaign status:

    • started
    • stopping
    • stopped
    • completed
    <campaign_ref>Your Campaign reference

    Example:

    Code Block
    languagebash
    themeMidnight
    # get notifications for all campaigns
    psubscribe enigma:notifications:campaigns:*
    
    # get notifications for campaign 1234
    subscribe enigma:notifications:campaigns:1234

     

     

    Ending a Campaign

    If a campaign runs out of callees to call it will stop. 

    If a campaign is manually stopped via the API, it will first enter a stopping state which indicates that  the agents still have callee's on the line and that there are still callees in the queue. Once all the callees are dealt with it will enter stopped.

    A campaign is only completed if it has dialed all callees and all retries have been reached.