Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
maxLevel3

Overview

This article explains how you how can fully automate your updates on conversions (validation process using so called CAD (conversion additional data) requests. Via the CAD request, you communicate from your data warehouse to the platform whether an order has been canceled or confirmed and whether there were any changes to the order value.

There are two options to automate your validation using CAD requests. What option you can use, depends on whether you can generate unique IDs on the confirmation pages of your advertiser's website.

Two automated validation options

The first automated validation option is relevant when you do not generate unique IDs on the confirmation page of advertiser's website. In this case, you automatically export conversions or basket positions from the platform. How you do this, is described in this article. The data you export needs to be compared with the information in your data warehouse. Subsequently, you adjust the status of the conversions and basket positions on the platform using the CAD requests. In case of partial cancellations, you will also adjust the order value or, when you are working with basket positions, the value of the basket position.The second option is relevant when you and your advertiser are capable of generating unique IDs on the confirmation page of the advertiser's website. In this case, you simply send out a CAD request whenever you have relevant information about conversions or basket positions available in your data warehouse. The conversion and the basket position will be identified using the unique ID transmitted when they were originally tracked.

...

Creating CAD requests) using requests. You transfer changes from your system (data warehouse, ERP, …) to your Partner Marketing Platform for the following (non exhaustive list of) use cases:

  1. Let the Ingenious Platform recalculate the commissions and fees by:

  • Updating the status (approve, reject, reopen)

  • Changing the revenue

  • Adding or changing basket entries

  • Changing conversion target or tracking categories of conversions

2. Supply commissions calculated by an external system

Understanding the basics

The Ingenious Platform supports two types of conversions:

  • conversion without basket entries

  • conversions with basket entries, often used in an E-Commerce use case

When values of a conversion or the basket entries are changed, in most cases a recalculation of the commission and fee is the effect of your change. The conversion update process supports changing values for both types of conversions. However, for each conversion type, a different set of parameters is changeable. The following diagram illustrates your options:

Drawio
zoom1
simple0
inComment0
pageId1440415930
custContentId1886421111
lbox1
diagramDisplayNameanatomy_of_conversion.drawio
contentVer7
revision7
baseUrlhttps://ingenioustechnologies.atlassian.net/wiki
diagramNameanatomy_of_conversion.drawio
pCenter0
width922
links
tbstyle
height691

Conversion without basket entries:

  • You currently cannot provide an externally calculated fee. However, you can influence the fee by changing calculation-related fields, which will trigger recalculation.

Conversion with basket entries:

  • The tracking category, revenue, and commission cannot be changed on the top-level. You have to change it on basket-level.

  • You currently cannot provide an externally calculated fee for basket entries. However, you can influence the fee by changing calculation related fields, which will trigger recalculation.

  • When you want to change the status of an individual basket entry, you have to set the status on the basket-level.

  • For your convenience, there are some handy automated status changes implemented:

    • When you change the status of a conversion on the top-level, all basket elements will inherit this status change. Use this option if you want to change all basket entries to the same status.

    • When at least one basket entry is approved (status = "1”), the top-level conversion status will also automatically change to approved.

    • When all basket entries are rejected (status = "2”), the top-level conversion status will also automatically change to rejected.

  1. confirmed, rejected, rejected => conversion=approved → conversion=confirmed

  2. confirmed, rejected, open => request is rejected

  • MATURITY Time!

Getting started

Domain

A CAD request has the following basic structure:

...

As you have probably noticed, you cannot use the export domain of your platform for your CAD request. Instead, you need to use the tracking domain. If you are using several tracking domains on your platform, make sure you use the tracking domain of the advertiser you are validating conversions or basket positions for.

Security

Please note that while both secured and unsecured protocols are allowed, but using a secured protocol (https) is higly recommended. Apart from that, make sure that the CAD requests are send via a server, not via a browser.

Format

The conversions and basket positions are identified by adding data parameters to the CAD request. These data parameters are discussed in more detail below. Please make sure you separate all data parameters with an ampersand.

Data parameters for conversions

If you want to create a CAD request for your conversions, you need to add the following parameters to the request:

Parameter name

Explanation

Mandatory

Corresponding field in export file

Example

tst

The UNIX timestamp of your request, will be filled out automatically.

No

n/a

1429018671

trc

The tracking category of the conversion. The tracking category can be changed, please note that in this case update notification (3rd party tracking) may be affected.

Yes

conversion_product_category_label

basket

ctg

The conversion target of the conversion.

Yes

conversion_target_label

sale

cid

The order ID of the conversion.

Yes

conversion_id

1234567asd

cfs

The status of the conversion. Possible values are either:
cnf (confirmed), rjt (rejected) and opn (open).

Yes

conversion_status

cnf

cfd

The time and date on which the conversion was validated. Please note that the format from the export file (yyyy-mm-dd hh:mm:ss) must be URL encoded.

No

2015-04-14 15:37:51

2015-04-14%2015%3A37%3A51

ovn

The new order value of the conversion. Please use this parameter only when you want to adjust the order value.

No

conversion_order_value

25.45

ctp

The type of commission that should be attributed to the ad space, according to the commission model applied to the transaction. Possible values are fix or percent. Please use this parameter only when you want to adjust the commission.

No

conversion_commission_type

percent

crt

The new commission rate of the conversion. Please use this parameter only when you want to adjust the commission.

No

conversion_commission_rate

2.5

unqid

A unique ID identifying the conversion, used for security purposes.

Yes

conversion_uniqid

14e31669-6940-2204-8004-8340696916e3

cre

You can use this parameter to explain the reason why a conversion was canceled.

No

conversion_reason_canceled

Order%20was%20canceled.

mkey

The magic key identifies the user processing the automated validation, making the process transparent and secure.

Yes

n/a

0b539c09-e0de-42c6-9b9c-f4a42d92d389

responsepreview_previewmode

Activate Preview Mode to validate input parameters. No processing takes placepreview mode to process request without saving

No

n/a

1 or true

For more information about the magic key, please read this article.

For more information about the preview mode, please read this article.

Example CAD request for conversions

If you implement the data parameters (including the non-mandatory ones), the CAD requests for conversions will look more or less like this:

Code Block
https://marketing.net.yourdomain.com/ts/i1234567/tsa?typ=d&tst=1429018671&trc=basket&ctg=sale&cid=1234567asd&cfs=cnf&cfd=2015-04-14%2015%3A37%3A51&ovn=20.00&ctp=percent&crt=5.00&unqid=4e31885-6940-2204-8784-8340696916e3&cre=Order%20was%20canceled&mkey=0b539c09-e0de-42c6-9b9c-f4a42d92d389

CAD response

Http Status

  • 200 on success

  • 422 "Unprocessable Entity"on processing error

Default Content Type Json

Content

Json object containing

  • params - all decoded query string parameters

  • request_subtype - "AdditionalData"

  • conversion_id - checked conversion id (when present)

  • basket_new - checked basket object (when present)

  • all checked numeric parameters (ovn, crt) in Preview Mode

  • cfd - checked timestamp (when present) in Preview Mode

  • error object (on processing error) containing codereason and optional message

...

Code Block
{ "params" : { "unqid" : "fdsfdsafdsa435435243fdfdsaf" , "typ" : "d"} ,
"request_subtype" : "AdditionalData" ,
"error" : {"code" : 88 , "reason" : "ConversionAdditionalDataRequest" , "message" : "unqid: fdsfdsafdsa435435243fdfdsaf is not a valid UUID"}}

Validation of basket positions: The basics

A conversion that contains basket information contains two levels:

...

  1. validation of the basket positions

  2. as soon as all basket positions are validated, the conversion status will automatically change: To approved, as long as at least one position is approved, to rejected in case all positions are rejected.

Data parameters for basket positions

Parameter name

Description

Mandatory

Corresponding field in export file

Example

tst

The UNIX timestamp of your request. Please note the value will be filled out automatically.

No

n/a

trc

The tracking category of the transaction to which the basket position belongs. Please note the tracking category must always be basket.

Yes

conversion_product_category_label

basket

ctg

The conversion target of the transaction to which the basket position belongs.

Yes

conversion_target_label

newSale

cid

The order ID of the transaction to which the basket position belongs.

Yes

conversion_id

1234567asd

unqid

A unique ID identifying the transaction, used for security purposes.

Yes

conversion_uniqid

14e31669-6940-2204-8004-8340696916e3

mkey

The magic key identifies the user processing the automated validation, making the process transparent and secure.

Yes

n/a

0b539c09-e0de-42c6-9b9c-f4a42d92d389

bsknew

This parameter contains all details of the basket position in JSON format (URL encoded), including the basket status that needs to be adjusted for the validation process.

Yes

n/a

%5B%7B%22price%22%3A%22182%22%2C%22quantity%22%3A%220%22%2C%22commissionFix%22%3A%220%22%2C%22commissionPercent%22%3A%2211%22%2C%22categoryId%22%3A%223682%22%2C%22productId%22%3A%22MA339HL84SEDLMX-893765%22%2C%22productNumber%22%3A%22Green%20Hoover%20vacuum%20cleaner%22%2C%22positionId%22%3A%221%22%2C%22status%22%3A%221%22%7D%5D%0A%0A

For more details on the basket parameter, please read this article. A comprehensive documentation on the magic key can be found here.

Possible actions for basket positions

Updating a basket is done with the help of the parameter "bsknew:" The value transmits the new basket including the changes. When validating basket positions, there are 3 options, that can be executed:

...

For more details on the basket parameter and how to work with it, please read this article.

Example CAD request for basket positions

If you implement all the parameters mentioned above, your CAD request for basket positions will look more or less like this:

...