Skip to Content

CJ Affiliate

Send server-side conversion events to CJ (Commission Junction) for affiliate partner attribution and commission tracking. Zeotap delivers conversion data via the CJ Tracking GraphQL API, enabling accurate partnership measurement without relying on client-side pixels or JavaScript tags.

Prerequisites

  • A CJ advertiser account with API access enabled
  • A Personal Access Token generated from the CJ Developer Portal 
  • Your Enterprise ID (provided by your CJ account representative or found in the CJ Account Manager portal)
  • An Action Tracker ID for the commissionable action (found under Tracking > Action Trackers in the CJ Account Manager)
  • Conversion event data with unique order identifiers

Permissions

Your CJ account must have advertiser-level API access. Personal Access Tokens replace the legacy Developer Key authentication. If you do not see the Personal Access Tokens page in the CJ Developer Portal, contact your CJ account manager to enable API access.

Authentication

CJ Affiliate uses Bearer Token authentication with a Personal Access Token.

  1. Log in to the CJ Developer Portal 
  2. Navigate to Account > Personal Access Tokens
  3. Click Create New Token and give it a descriptive name
  4. Copy the generated token immediately — it will not be shown again
  5. In Zeotap, paste the token as the Personal Access Token when creating the destination

The token is sent as a Bearer token in the Authorization header on every API request. Keep it confidential and rotate it periodically.

Configuration

FieldTypeRequiredDescription
Default Currency CodeTextNoDefault ISO 4217 currency code for conversion events (e.g., USD, EUR). Can be overridden per-row via field mapping.
Use Test EndpointToggleNoWhen enabled, sends requests to CJ’s test endpoint instead of production. Use during development to avoid impacting production data.

Target Settings

FieldTypeRequiredDescription
Enterprise IDTextYesYour CJ advertiser Enterprise ID. Found in the CJ Account Manager portal or provided by your CJ representative.
Action Tracker IDTextYesThe Action Tracker ID for the commissionable action. Found under Tracking > Action Trackers in the CJ Account Manager.

Supported Operations

Sync Modes

ModeSupported
InsertYes
Update
Upsert
Mirror

CJ’s Tracking API submits new conversion events via the addOrders GraphQL mutation. Each request creates new conversion records. Order restatements and cancellations are separate operations not exposed through the standard insert sync mode.

Audience Sync Modes

ModeSupported
Add
Remove
Mirror
Upsert

CJ Affiliate does not have a list or audience membership API. Use sync modes for sending conversion events only.

Features

FeatureSupported
Field MappingYes
Schema IntrospectionNo

Required Mapping Fields

FieldDescription
order_idA unique advertiser-supplied order identifier for the conversion event. Must be unique per action tracker.

Default Destination Fields

Core Conversion Fields

FieldTypeDescription
order_idstringUnique advertiser-supplied order or transaction identifier.
event_timetimestampConversion timestamp in ISO 8601 format with UTC zone designator (e.g., 2024-01-15T10:30:00Z). Defaults to current time if not mapped.
amountnumberTotal sale or conversion amount.
currencystringISO 4217 currency code (e.g., USD, EUR, GBP).
discountnumberDiscount amount applied to the order.
couponstringCoupon or promotional code used in the transaction.

Attribution Key

FieldTypeDescription
cj_eventstringThe unique CJ-generated cjevent token passed to your site on a partner click. This is the primary attribution key for matching conversions to affiliate referrals.

Providing the cj_event token is strongly recommended for accurate partner attribution. Without it, CJ may not be able to match conversions to the originating affiliate click.

Item-Level Fields

FieldTypeDescription
item_skustringProduct SKU or identifier. For multiple items, use a comma-separated list.
item_quantitystringQuantity per item. For multiple items, use a comma-separated list matching item_sku order.
item_unit_pricestringUnit price per item. For multiple items, use a comma-separated list matching item_sku order.
item_discountstringPer-item discount amount. For multiple items, use a comma-separated list matching item_sku order.

When providing multiple items, ensure all item field lists have the same number of comma-separated values and are ordered consistently (e.g., first SKU corresponds to first quantity, first unit price, etc.).

Customer Fields

FieldTypeDescription
customer_statusstringWhether the customer is NEW or RETURNING. Enables partner programs that differentiate new customer acquisition from returning customer conversions.

Vertical Parameters

FieldTypeDescription
advertiser_verticalstringThe advertiser’s vertical category (e.g., RETAIL, FINANCE, TRAVEL). Enables vertical-specific commissioning.
taxnumberTax amount for the order.
shippingnumberShipping cost for the order.

Cross-Device Tracking

FieldTypeDescription
shared_event_idstringShared event identifier for cross-device attribution. Used when conversions span multiple devices or sessions.

How It Works

Zeotap reads rows from your model query and applies field mapping to transform your data into CJ’s order conversion format.

Event delivery: Orders are sent in batches of up to 500 per GraphQL request to https://tracking.api.cj.com/graphql using the addOrders mutation. Each batch includes the Enterprise ID and Action Tracker ID configured in the target settings.

Authentication: Every request includes the Personal Access Token as a Bearer token in the Authorization header.

Conversion lifecycle: Submitted orders are processed asynchronously by CJ. Attribution determination — matching conversions to affiliate clicks via the cjevent token — happens after submission. You can monitor conversion status and attribution in the CJ Account Manager dashboard.

Attribution: CJ uses the cjevent token to match conversions to affiliate partner clicks. This token is a unique identifier generated by CJ when a user clicks an affiliate link. Capture the cjevent query parameter from partner referral URLs and store it with your conversion data for the strongest attribution signal.

Item-level data: For purchase conversions with multiple products, map item fields (item_sku, item_quantity, item_unit_price, item_discount) as comma-separated lists. Zeotap automatically parses these into the parallel array format required by CJ’s API.

Error handling: Zeotap retries failed requests automatically on transient errors (5xx, network issues). GraphQL-level errors and per-order validation errors are recorded as row-level errors and reported in the sync run details.

Rate Limits

CJ’s Tracking API processes submissions in batches. Key limits:

ParameterLimit
Orders per request500
Orders per submission10,000
Request timeout120 seconds

Zeotap automatically chunks large syncs into batches of 500 orders per request. If you encounter rate limiting, reduce sync frequency or model query result sizes.

Best Practices

  • Always capture and include the cjevent token: The cj_event field provides the primary attribution signal. Capture the cjevent query parameter from affiliate referral URLs and store it alongside your conversion data
  • Use unique Order IDs: Order IDs must be unique within each action tracker. Duplicate Order IDs will be rejected. Consider appending a timestamp or sequence number if your source data may produce duplicates
  • Set Event Time accurately: Map the event_time field to the actual conversion timestamp rather than relying on the default (current time). This ensures conversions fall within the correct attribution window
  • Use the test endpoint during development: Enable Use Test Endpoint in configuration to validate your setup without affecting production data. Test mode uses https://tracking.api.cj.com/graphqltest with the same validation rules as production
  • Include customer status: Map customer_status as NEW or RETURNING to enable partner programs that differentiate between new customer acquisition and returning customer conversions
  • Provide item-level detail for Situational Commissioning: If your CJ program uses Situational Commissioning (variable commission rates based on product attributes), include item-level SKU, quantity, and price data

Troubleshooting

Conversions not appearing in CJ Account Manager

Conversions are processed asynchronously after submission. They may take several minutes to appear in the CJ Account Manager. Check the API Submissions section to verify receipt. If using the test endpoint, submissions will not appear in production reports.

Authentication failed (HTTP 401)

Verify your Personal Access Token is correct and has not expired. Generate a new token from the CJ Developer Portal . Ensure no extra whitespace was included when pasting the token.

Enterprise ID or Action Tracker ID not found

Verify both IDs are correct. The Enterprise ID is a numeric identifier for your advertiser account. The Action Tracker ID identifies the specific commissionable action. Both can be found in the CJ Account Manager or obtained from your CJ representative.

Order ID already exists error

Order IDs must be unique within each action tracker. If you receive a duplicate error, verify your model query produces unique identifiers. Consider appending a timestamp suffix or using a composite key (e.g., order_id + line_item_id).

Missing attribution — conversions not matched to partners

The cj_event token must be present and valid for CJ to match conversions to affiliate clicks. If conversions are submitted but not attributed, verify that you are capturing and storing the cjevent URL parameter from partner referral links. The token has a limited attribution window — ensure conversions are submitted promptly.

GraphQL validation errors

CJ’s GraphQL API validates all input fields. Common causes include: missing required fields (order_id, enterprise_id, action_tracker_id), invalid currency codes, malformed timestamps (must be ISO 8601 with UTC zone designator Z), or invalid item arrays. Check the row-level error messages in the sync run details for specific field validation failures.

Rate limit exceeded

If you are submitting very large volumes of conversions, you may exceed CJ’s processing limits. Reduce your model query batch size or schedule syncs at longer intervals. Zeotap automatically retries rate-limited requests with exponential backoff.

Test endpoint submissions appearing in production

Ensure Use Test Endpoint is enabled in the destination configuration. If this toggle is off, all submissions go to the production endpoint. Test and production endpoints use separate processing pipelines.

Last updated on