• PRODUCT

    PRODUCT

  • PRICING
    PRICING

  • HELP
    HELP

  • BLOG
    BLOG

  • APPSTORE
    APPSTORE

  • COMPANY
    COMPANY

  • LEGAL
    LEGAL

  • LOGIN
    LOGIN

  • Messaging System APIs and functionality


  • Messaging System APIs and functionality


  • Functionality

    • Generate content (email subjects, body, etc.) using scripted templtes
    • Deliver messages using the Transfer Agent for the specific message type
    • Keep a log of all the messages exchanged in the system

    Scripting Signature

    You may launch the API by doing:

    ['//executioncontext/messaging:viewer/compose/api/crud', payload, modtask]

    The outcome will be put in modtask.outcome, i.e.

    launchAPI(payload, cb) => {

    doChain([

    ['//executioncontext/messaging:viewer/compose/api/crud', payload, modtask],

    () => cb(modtask.outcome)

    ])

    }

    Actions

    Generate

    Payload should be

    {

    action: 'generate',

    objconfig: {

    templateaddress: 'the-template-address',

    fromIds: [userId, ...]

    toIds: [userIdm ...]

    }

    }

    And the output will create a JSON representation of the messagelog entry:

    {

    success: true,

    data: {

    fromId: obj.froms[0].id,

    fromEmail: obj.froms[0].user,

    toId: obj.tos[0].id,

    toEmail: obj.tos[0].user,

    subject: obj.template.title,

    body: obj.template.description,

    templatepath: objconfig.templateaddress

    }

    }
    process
    Will either create a new messagelog entry and call the transfer agent or load an existing messagelog entry and call the transfer agent.

    If the payload is

    {

    action: 'process',

    obj: {

    // outcome.data from the call to generate

    }

    }

    then the API will generate a new messagelog entry. However, if the payload is:

    {

    action: 'process',

    messageId: numeric value

    }

    the API will load the messagelog entry based on messageId.

    In both cases the API will send a using the transfer agent.


  • Izyware Help Articles
    Izyware Help Articles