Prerequisites

You should have

  • an user-account enabled for api access & order management access
  • an api-client
  • a configured Email-Channel in your Hublify


Quick Infos

Some generic helpful infos on invoice-data within Hublify

  • Sending a templated Invoice-Email is actually using a standard "send"-function in Hublify Message Builder App.
  • You can have multiple configured Message-Templates in parallel and use them on demand.
  • Invoice Message Templates functionality is very flexible & smart. 
    From within your Subject / Content you can access and render any data from your Hublify!
  • An attached Invoice - PDF Document is just a live (template-) rendered PDF form current Invoice data.
  • You can attach instead or additionally any other static or dynamic files too.
    That is configured within the actual Message-Template itself.

 

The Invoice Email Template

Hublify provides a standard default Email Message Template.

Of course, you can add your own Invoice Message Templates!

The standard Hublify Invoice Template does, if being sent in context to an invoice-record  ...

  • Determine the correct TO-receipient
    • a) An manual overriding TO given, in "msgtpl_dynparams.to" ?
    • b) Invoice-Email set in invoice record?
    • c) Connected Person's Email set?
  • Build dynamic Email Subject
  • Render actual Email Content
  • Render and attach the Invoice-PDF

If you want to use Hublify Standard Email Message Template, please lookup its msgtpl_uuid-value in your Hublify App Message Builder!


Sending an email

With one api call you can send one or multiple emails.

 

... one

Actually this describes how to use Hublify's Message Template App to send a configured message.

Please further details on using the Message Builder (via api) at that section.

Request URL

https://{your hublify url}/api/eos_10/data_list_sendmessage

Request parameter

{
    "dataset": "invoice",                  // (required) Dataset-Label of "context-data".

    "filter": {                            // (required) Filter-Criteria to select the context-data-record.
        "inv_id": {                        // Bascially you can any kind of filter to select desired
            "in": [                        // invoice record(s) !
                "2142"
            ]
        }
    },

    "fields": [                            // (optional) Fields of dataset-record to retrieve beforehand and
        "inv_id",                          // inject into template-rendering as twig-variables.
        "inv_code",                        // This is a good field-selection to re-use!
        "inv_email",                       // Any fields you list here, are selected
        "invoice_email",
        "inv_firstname",
        "inv_lastname",
        "personid",
        "email"
    ],

    "msgtpl_uuid": "msgtpl-999daf1-6fb7711eb-88ee-0999c0a83003", // (required) The unique message-template-id to use & build and send.  

    "msgtpl_dynparams": {                  // (optional) Possible properties absolutely depend on the chosen message-template!
        "to": "override@example.com",      //
        "cc": "",
        "bcc": "",
        "from": "",
        "replyto": ""
    }

}

Response


Response

If your request was successful, you receive the current status and the hublify ids for this order and person.

{
    "status": true,
    "data": {
        ...
    }
}

Response - Error

If your request failed, you receive a message detailing the error that occurred.

{
    "status": false,
    "msg": [
        {
            "type": "ERROR",
            "text": "... SOMETHING !"
        }
    ]
}

 

... many

You can send multiple Invoice Emails at once. Just change the filter-criteria to match multiple invoice-records!