Message Record Format

Introduction

The message record is part of the Petals XML based order and message exchange service. It was introduced as part of Version 45 and will not work with earlier versions. (see version history).

The message record is designed to exchange complaints and other messages relating to an order between parties using the XML system. Its use is optional and partners will need to advise Petals of the URL and password etc to use for Petals to be able to send a message record to that party. This will normally be the same used by Petals to send XML based orders and messages to participating parties.

A message thread is a collection of separate messages that can be read in chronological sequence to form a complete picture of the history of the management of an issue relating to a order.

For example, an exchange might look like the following;

  • supplier: address is wrong. No such street. Need a delivery phone number
  • seller; customer says street is right. Phone is +61 0407999999
  • supplier; phone is disconnected
  • seller; please cancel order
  • supplier; will i get paid for my effort
  • petals; according to our guidelines, will not get paid for this order

each dot point is a message and the set are a thread of messages.

Messages with no order number will be general in nature; e.g. price change on product B!

Once a message thread is resolved to Partners satisfaction, they can indicate this by sending a 'finalized' message; either with the last message in the thread or as a separate record.

Message exchange will play like a game of tennis. The "ball" (message) will be in the hands of the last to receive it and they should respond with a return message and/or finalization to return the 'ball' or close out the exchange of messages respectively.

When Petals receives a message record, we will return a status record in response to the POST sending the message to Petals. The status record will act as a receipt of transmission and mention any errors found. See status record description for format and codes.

Evolution

  • the original version of the status record was created in March 2009 for beta usage

Data Fields

The outermost node is named <message>.  Inside nodes are:

Required Field Name Description Length Type
Y recordtype "03" = message record 2 Character
Y member A Partner number for the Partner sending the message, issued by Petals 5 Number
Y petalsid The Petals order reference number in the format mmmm.oooooo made up of 3-5 Petals member number and 6 digit transaction number supplied by Partner else set by Petals. 15 Number
N sellid An optional order reference supplied by the seller of the order to key into their system. Petals will try to pass this number around the partners to make it more convenient for the seller to find a referenced order in their system 15 alpha/num
N supplyid An optional order reference supplied by the supplier of the order to key into their system. Petals will try to pass this number around the partners to make it more convenient for the supplier to find a referenced order in their system 15 alpha/num
Y password The password given to you by Petals. 8 Characters
Y type A fixed code number for the information conveyed by this message record. See the current list below. 3 Character
N notes The actual message.  The actual message length can be effectively as long as necessary. It is expected to be stored in a MEMO or VARCHAR field or similar data field type depending on your system. It should contain only text; no HTML and no special characters.   Character
N gmt Inserted by Petals: This contains a GMT datestamp in XML format for when the status flag was sent by Petals. The format is "yyyy-mm-ddThh:mm:ss" in 24hour time. This may be of most use where incoming status messages are printed or held in a store and might otherwise lose the time information. GMT will be of most use when adjusting the time to your local time zone using an offset against GMT. 19 datetime
N petalsdt Inserted by Petals: This is the time that this message came into the Petals system in Petals HQ local time.  It can give an idea of how old the message is by the time you receive it. Given the time zone, this might be of most use to  Australian Partners. 19 datetime
N deldate Inserted by Petals: - delivery date yyyymmdd 8 date
N recipient Inserted by Petals: - Name of person receiving flowers 60 Character

**

Error Code List

Current

Code Meaning
M this is a message that is not registering a complaint.
C this is a message that is a complaint about the order
F The sending Partner considers the matter is closed (finalized). Normally the initiator of the message would be the one to close it when they are satisfied.

Possible Additions

Code Meaning
R order rejected (under value, bad address, etc
D delivered to recipient

Notes

  • All field names and XML tags are in lower case, this is to accommodate those systems that are case sensitive
  • missing required data may cause the order to be rejected by Petals. We will try to provide feedback on problems of this type via email or web (and later with an XML record). However, if we can't identify who the order is from, this will not be possible.
  • Petals presently shows a website response when it receives an order and a confirmation email to the address supplied. There are also periodic daily reconciliations emailed to all parties for further checking.
  • If any data field contains more characters than permitted in that field, it will be truncated at the maximum field size automatically (and possibly without notice). It is the responsibility of the order sender to 'pack' their information fields to fit within the maximum field size.