Requires Powercode build 26.10.05 or later.
Upgrading from an earlier build? MailXStream now uses an Access Token instead of the old username and password. Until you enter a token, Powercode sends nothing to MailXStream. That includes the automatic bill-day run. See Before you start.
The MailXStream integration has your invoices printed and mailed for you. It's meant for customers who get paper invoices. Powercode packs the invoices into an order and sends it to MailXStream, which prints and mails them. MailXStream then reports the order's progress back, and Powercode shows it on the MailXStream Orders report and on each customer's invoice list.
You can send invoices three ways:
| Permission | Why it is needed |
|---|---|
| MailXStream (System → Third Party Integration) | To open and change the MailXStream settings. |
| Print to Mail Invoice (Reports → Invoice) | To use Send Invoices to MailXStream and the MailXStream Orders report, including refreshing and canceling orders and downloading Certificates of Mailing. |
| MailXStream Manual Sending (System → Third Party Integration) | To see and use the Send to MailXStream link on a customer's invoices. |
After saving, a banner tells you whether Powercode could reach MailXStream. The check runs only when Enabled is Yes. Your settings are saved either way.
| Banner | What it means |
|---|---|
| "MailXStream settings saved. Connection verified and the configured template was found." | You're ready to send. |
| "MailXStream settings saved, but the connection could not be verified. Check the access token." | MailXStream didn't accept the token, or couldn't be reached. |
| "MailXStream settings saved and the token works, but the configured template was not found on your account. Contact MailXstream support before sending invoices." | The token works, but your account has no template matching your Format, Remittance Envelope and International choices. |
If the integration is enabled and you still have an old username and password but no token, the page shows: "MailXstream now requires an API access token. Generate one on your MailXstream profile page and enter it below - the previous username and password are no longer used."
| Field | What it does |
|---|---|
| Enabled | Yes turns the integration on. Invoices for customers with an invoice preference of Print or Both are then sent to MailXStream automatically on their bill day. |
| Access Token | Your API access token for MailXStream Web Services v3. Powercode stores it encrypted and never shows it again. Once a token is saved, the box reads "Token configured - enter a new value to replace it". Leave it blank to keep the saved token. |
| Test Mode | Yes sends orders to the MailXstream test environment (test.mailxstream.com) with the test flag set. Nothing is printed or mailed. No sends orders to be printed and mailed. |
| Format | Black and White, Color, Duplex or Duplex Color. Color may incur additional charges. |
| Remittance Envelope | Included or Not Included. Including an envelope may incur additional charges. |
| International | Tick it to use the international version of your template. |
Powercode builds the template name from your settings and sends it with every order. MailXStream support may ask which name you're using.
| Part | Rule |
|---|---|
| Start | Black and White uses Powercode: Invoice. Other formats add the format name, for example Powercode: Invoice Color or Powercode: Invoice Duplex Color. |
| Remittance Envelope | Included adds with CRE. |
| International | Ticked adds - International. |
For example, Color with the envelope Included and International ticked uses Powercode: Invoice Color with CRE - International.
With Test Mode set to Yes:
Each order remembers where it was sent. Switching Test Mode later doesn't affect existing orders: refreshing, canceling and downloading the Certificate of Mailing still go to the environment the order was submitted to.
Set Test Mode back to No before your next real bill day.
When Enabled is Yes, automatic daily billing sends that day's invoices to MailXStream as one order. Only customers with an invoice preference of Print or Both are included. These orders show Daily in the Source column.
If sending fails, daily billing carries on with everything else. The failure is recorded in the System Event Log.
Every invoice in the date range goes in one order, as long as the customer's invoice preference is Print or Both. Each invoice is charged by MailXStream. When the order is accepted, Powercode opens the MailXStream Orders report. These orders show Manual in the Source column.
Both the batch and the bill-day run skip invoices with no balance due, unless Send Zero Balance Bills is turned on in Config > Billing & Payments > Invoices.
"Sent to MailXStream Successfully" means MailXStream accepted the order. This sends the invoice whatever the customer's invoice preference is. These orders show Single in the Source column.
While the integration is enabled, the Past Invoices list has a Mailing Status column for invoices sent to MailXStream:
Go to Reports and open MailXStream Orders under System Reports. It lists every order Powercode has sent, newest first. You can sort and filter each column.
| Column | What it shows |
|---|---|
| Submitted | When Powercode sent the order. |
| Name | The order name: "Powercode:" followed by the date and time it was sent. |
| Source | Daily (bill-day run), Manual (Send Invoices to MailXStream) or Single (Send to MailXStream on one invoice). |
| Date Range | The invoice dates included, for Daily and Manual orders. |
| State and Status | The order's progress, as reported by MailXStream. |
| Pieces | The number of mail pieces, once MailXStream reports it. |
| Errors | Error messages from MailXStream. Hover to read the full text. |
| Test | Yes for orders sent in test mode. |
| Actions | See below. |
Powercode checks MailXStream every hour for updates on open orders. It keeps checking until the order is complete or canceled, for up to 60 days after it was sent.
| Action | What it does |
|---|---|
| Refresh Status | Gets the latest state from MailXStream now, instead of waiting for the hourly check. |
| Cancel Order | Cancels the order at MailXStream. It's offered only while the order is at an early stage: State is blank, INIT, SEGMENT or SORT, and Status is blank, WAIT or ERROR. Powercode asks you to confirm: "Documents already printed cannot be recalled." Click Yes, cancel it to go ahead, or Keep it. |
| Certificate of Mailing | Opens MailXStream's Certificate of Mailing as a PDF. It appears once the order's State is COMPLETE. |
| Documents | Opens a list of the invoices in the order, with Invoice (a link to the invoice), Impressions, Error and Carrier Tracking. |
| Symptom | Likely cause |
|---|---|
| "MailXstream now requires an API access token. ..." banner on the settings page | You upgraded from the username and password version. Generate a token on your MailXstream profile page and enter it in Access Token. |
| MailXStream requires an API access token. Generate one on your MailXstream profile page and enter it under Configure > MailXStream. | No token is saved. Enter one on Third Party > MailXStream. |
| MailXStream integration is not enabled. | Enabled is set to No. |
| "MailXStream settings saved, but the connection could not be verified. Check the access token." | The token is wrong or no longer valid, or MailXStream couldn't be reached. With Test Mode on, the check uses the test environment. |
| "...the configured template was not found on your account. Contact MailXstream support before sending invoices." | Your Format, Remittance Envelope and International choices point at a template your account doesn't have. See Template names. |
| Nothing was sent on bill day | Enabled is No, no token is saved, automatic billing isn't on, or no customers billed that day have an invoice preference of Print or Both. Look in the System Event Log for "Sending invoices to MailXStream failed". |
| No printable invoices were found for the selected date range. | No invoices in the range belong to customers with an invoice preference of Print or Both, or they have no balance due. |
| Start date must be less than or equal to end date. | The dates are the wrong way round. |
| Sending invoice to MailXStream failed - failed to load pdf file. | Powercode couldn't find the PDF for that invoice. |
| MailXStream accepted the upload but returned no order id, so the order cannot be tracked. Check the MailXstream dashboard before resubmitting to avoid double mailing. | MailXStream may have the order even though Powercode can't track it. Check your MailXstream dashboard before you send again. |
| Your session has changed. Reload the page and try again. | The page was open too long, or you signed in again in another tab. Reload and retry. |
| Certificate of Mailing is not available yet - MailXStream generates it on first request, which can take a while for large orders. Try again shortly. | MailXStream is still producing the certificate. Try again in a few minutes. |
| No document details yet - refresh the order after MailXStream has processed it. | MailXStream hasn't reported the invoices in the order yet. Click Refresh Status later. |
| Order no longer exists at MailXStream (404). in the Errors column | MailXStream no longer has the order, so Powercode stopped tracking it. |
Every send, success or failure, is recorded in the System Event Log. A successful send reads "Successfully sent N invoice(s) to MailXStream as order order ID."