What is a transaction?
A transaction contains key information about a customer purchase, such as the Items, sale price, date and time stamps, and payment methods. Transactions influence different areas of Omneo such as Profile aggregations. Anonymous transactions can be claimed at a later date using Claim Transaction.
This allows the customer to attribute sales to their brand profile at a later date if they forgot to log in.
{
"id":43,
"external_id":60391123,
"redemption":3,
"profile_id":"08bae47-3333-49d2-9399-c2e87da3328d6",
"location":3,
"meta":null,
"total":99.99,
"total_original":110,
"systems":[
],
"rounding":10,
"margin":31,
"is_void":false,
"transacted_at":"2021-01-27 23:00:00",
"timezone":"Australia/Melbourne",
"tags":[
],
"items":[
{
"id":55,
"external_id":null,
"name":"test_prod",
"transaction_id":43,
"product_id":29259,
"product_variant_id":129929,
"sku":1012310,
"variant_external_id":null,
"is_void":false,
"quantity":1,
"price_current":99.99,
"price_sell":99.99,
"price_original":null,
"price_margin":null,
"price_tax":null,
"discounts":null,
"product_images":[
],
"created_at":"2021-01-27 23:38:36",
"updated_at":"2021-01-27 23:38:36"
}
],
"payments":null,
"receipt_is_email":null,
"receipt_ref":null,
"claimed_at":null,
"receipt_email":null,
"staff":null,
"currency_id":null,
"currency_rate":null,
"currency":null,
"created_at":"2021-01-27 23:38:36",
"updated_at":"2021-01-27 23:38:36"
}
Transaction Properties
Meta Fields
For any custom data required for your Omneo integrations, meta
can be used to store your custom data as an object. These key value pairs can be modified as needed, and there is no limit to their naming or quantity.
Attribute | Description |
---|---|
idREAD-ONLY INTEGER | A read only identifier for the transaction |
profile_idSTRING | The profile_id of the linked Profile*or email/identity value when profile_id_handle specified |
profile_id_handleSTRING | Specify to search a profile by email or identity. Further information on profile_id_handle in below section |
external_idSTRING | An 3rd party reference for the transaction. Usually the transaction reference as it appears in the client system |
redemptionOBJECT | The redemption object returned from the specified redemption_id provided during the Add Transaction request. |
redemption_idINTEGER | The id of the redemption created using Add Reward or Point Redemption. Used to attach the redemption to a transaction. |
locationOBJECT | The Location where the transaction was placed |
location_idSTRING | Omneo first looks for a location with matching id If not found, Omneo will search for a location with a matching external_id if not found, Omneo will create a new transaction with matching external_id |
currencySTRING | The currency of the transaction Must be a valid currency configured in your Omneo portal |
totalFLOAT | The total value of the sale |
roundingFLOAT | a $ value used when rounding the total value, this is usually cents and is can be used to round the total up to the nearest whole number. |
tenderSTRING | A simple string displaying the tender used on the transaction. |
marginFLOAT | The gross profit across the entire transaction. |
deliver_atDATE-TIME | The delivery date and time |
transacted_atDATE-TIME | The Date and time of the transaction |
tagsARRAY | An array of customised tags against the transaction |
systemsARRAY | An array of systems against the transaction e.g ['pos','eftpos'] |
staff_id | The staff_id responsible for handling the transaction |
paymentsARRAY | An array of payments used against this transaction. example: [ { "eftpos" : 100, "cash": 20 } ] |
total_originalFLOAT | The total original price of the transaction |
timezoneSTRING | The timezone the transaction was placed in |
itemsOBJECT | Transaction line items attached to this transaction |
receipt_is_emailBOOLEAN | A boolean denoting whether the receipt was sent as an email |
receipt_refSTRING | The customer reference for the receipt. This is usually the customers primary identifier for the transaction, and is printed on their receipt. |
claimed_atDATE-TIME | Date the transaction was claimed (if applicable) |
receipt_emailEMAIL | The customer email address the receipt will be sent. |
metaOBJECT | All custom data to your Omneo implementation can go here. This can contain key value pairs. Some examples might be {"connote": 123, "shipping_date": "12-1-2022"} |
Attaching Profile to transaction using Email or Identity.
In many cases, the external client system will have no knowledge of the omneo id
.
attaching a profile_id_handle
to the transaction payload, changes the way Omneo searches for profiles.
This field can be set to search by Profile Identity, or by profile email.
By setting the profile_id_handle
to 'email'
Specify the "email" of the Omneo Profile you wish to attach the sale to
in the profile_id
field. Omneo will now search for a profile matching that email, and attach the transaction to it.
As part of your payload, this may look like:
{
...
"profile_id" : "[email protected]",
"profile_id_handle": "email"
...
}
By setting the profile_id_handle
to anything else
If this field is set to any other string, Omneo will look for a Profile with a Profile Identity handle
of the value you've put in profile_id_handle
, and with an identify value of the string you've specified in profile_id
.
An example of this in action may look like:
{
...
"profile_id" : "ID123",
"profile_id_handle": "ap21"
...
}
In the above example, Omneo will search for a profile with an identity with a handle "ap21".
And a value of "ID123". If this is found, Omneo will attach this profile to the transaction.
With the above logic, it is possible to attach an Omneo profile to a transaction without knowing the ID.
If external client system ID's are stored against profiles as identities
or if the profile email
is unique between systems, this method can be used.
Event Context
The transaction context available in webhooks and targets.
{
"id":20,
"external_id":"3d12ass4s4ds11",
"redemption_id":null,
"redemption":null,
"profile_id":"928bc629-8646-4d4b-808d-790fe6f334ae",
"staff_id":"92c1f3e8-98ab-4344-8508-aa7e018cda5b",
"staff" : {}, // Staff Context
"profile":{}, // Profile Context
"location_id":2,
"location":{}, // Location Context
"currency_id":null,
"total":19.99,
"is_void":false,
"total_original":null,
"currency_rate":null,
"rounding":null,
"margin":null,
"meta":null,
"deliver_at":null,
"claimed_at":null,
"transacted_at":"2021-04-16 03:45:20",
"tags":[
{
"id":11,
"handle":"simple",
"created_at":"2021-04-23 02:04:38",
"updated_at":"2021-04-23 02:04:38"
},
{
"id":12,
"handle":"tag",
"created_at":"2021-04-23 02:04:38",
"updated_at":"2021-04-23 02:04:38"
}
],
"systems":[],
"items":[
{
"id":20,
"profile_id":"928bc629-8646-4d4b-808d-790fe6f334ae",
"transaction_id":20,
"is_void":false,
"is_transaction_void":false,
"name":"Product 1",
"quantity":1,
"quantity_abs":1,
"price_current":10,
"price_sell":9,
"price_original":10,
"price_margin":1,
"price_tax":null,
"product_variant_id":1,
"product_id":1,
"item_sku":null,
"variant_external_id":null,
"sku":"aaaa",
"product":{
"brand":"test_brand"
},
"product_options":[
],
"product_images":[
],
"discounts":null,
"created_at":"2021-04-23 02:05:10",
"updated_at":"2021-04-23 02:05:10"
}
],
"payments":[
"EFTPOS",
"TESTING"
],
"receipt_is_email":false,
"receipt_ref":"AxKCC244XX133",
"receipt_email":"[email protected]",
"created_at":"2021-04-23 02:05:10",
"updated_at":"2021-04-23 02:05:10"
}