Skip to content
Coritan Docs

Send orders to ad platforms and leads to your email list

Send your store's sales to Meta, TikTok, OpenAI Ads, GA4, Google Ads and Microsoft Ads, and keep an EmailOctopus list of consenting shoppers in step.

View as Markdown

Integrations connects the store to accounts you hold elsewhere. There are eight:

  • Meta Conversions API sends each order to Meta as a Purchase.
  • TikTok Events API sends each order to TikTok as a CompletePayment event.
  • OpenAI Ads sends each order to OpenAI Ads as a conversion.
  • Google Analytics 4 sends each order to GA4 as a purchase.
  • Google Ads sends each order to Google Ads as a purchase conversion.
  • Microsoft Ads Conversions API sends each paid order to Microsoft Ads as a purchase.
  • Microsoft Ads lists each paid order in a file that Microsoft Ads imports as an offline conversion.
  • EmailOctopus adds new leads, and shoppers who agree to marketing, to one of your lists, and tells the store who leaves it.

The store sends from its own server once the order or lead is saved, so an ad blocker in the shopper's browser cannot stop it and a slow platform never holds up checkout. The Microsoft Ads file works the other way round: Microsoft Ads fetches it from the store on a schedule you set up in Microsoft Ads. You can use the file and the Conversions API together. Every integration is off until you turn it on.

FedEx delivery tracking is not on this page. It follows parcels instead of sending orders, so it lives on the Fulfilment page: Track FedEx parcels. This page still lists eight.

  • Every member of the organization sees the integrations and their deliveries. You need the Admin role to change one, to send a test or to replace the Microsoft Ads feed URL.
  • Have the account details ready. Each platform gives them in its own settings:
Integration Setting Secret
Meta Conversions API Pixel ID, the dataset ID in Events Manager An access token for the Conversions API, made in Events Manager
TikTok Events API Pixel code, from TikTok Events Manager An access token for the Events API
OpenAI Ads Pixel ID, from your OpenAI Ads account The conversions access token
Google Analytics 4 Measurement ID, such as G-ABC123DEF4, from the web data stream's details A Measurement Protocol API secret, made under the same data stream
Google Ads Conversion ID and label, such as AW-123456789/AbCdEfGhIjKlMnOp: the send_to value in the tag setup of your purchase conversion action None
Microsoft Ads Conversions API UET tag ID, the 5 to 15 digit ID of your UET tag in Microsoft Ads A Conversions API token, made in the same UET tag's settings in Microsoft Ads
Microsoft Ads Conversion goal name, the name of an offline conversion goal in Microsoft Ads None. Turning it on makes the feed URL
EmailOctopus List ID, from the list's Settings page An API key, from your EmailOctopus account
  1. Open your organization. In the sidebar, select Promotions under Store, then the Integrations tab.
  2. On the integration's card, fill in its settings and its secret. Google Ads and the Microsoft Ads file have no secret.
  3. Turn on the first switch on the card, the one named after the integration, then select Save changes.

The card's badge reads On, Test mode or Off. The store refuses to turn an integration on without its required setting and, where it takes one, its secret, and names the field that is missing. The first time you turn Microsoft Ads on, a dialog shows its feed URL once: Microsoft Ads offline conversions says what to do with it.

The secret is write only. After you save it, the card says only that it is set: nobody can read it back, from the dashboard or the API. To change it, type the new one and save. To remove it, select Remove … and confirm; an integration that is on must be turned off first.

Meta, TikTok and OpenAI Ads each get one event for each order placed, with the order's total, its currency, and each line's SKU (the variant ID where a line has none) and quantity. The event ID is the order's ID, such as order_01J8DSHP1043Q7VX2M4K9T. Use the same ID in your browser pixel, and the platform counts the sale once. The shopper's email, phone, name, city, region, postcode and country are hashed with SHA-256 before they leave the store, and so is the customer ID. The click IDs, IP address and browser the storefront passed go with them.

Google Ads gets one purchase conversion for each order placed, with the order's total and its currency. The transaction ID is the order's ID, such as order_01J8DSHP1043Q7VX2M4K9T. Send the same ID as transaction_id from the Google tag on your order confirmation page, and Google counts the sale once.

The shopper's email goes with it, hashed with SHA-256, and so do the shopper's browser and the click ID the storefront passed: gclid, gbraid or wbraid. An order with no email or no click ID is still sent. Google Ads gets no phone, name, address or IP address.

The store loads the conversion address the Google tag loads in a browser, with the shopper's browser, and follows Google's redirects as the browser does: to googleads.g.doubleclick.net, then to www.google.com or a country domain such as www.google.de. Google counts the conversion only once that last address answers, so a delivery is Sent only when the end of the chain answered 200. The Answer column shows that last answer. A failure after a redirect lists each address that answered, with its status. The store follows at most five redirects, and none that leaves Google's own addresses.

GA4 gets one purchase event for each order placed, through the Measurement Protocol, with the order's total, its currency and each line's SKU (the variant ID where a line has none), name, price and quantity. The transaction ID is the order's ID, so a purchase the Google tag on your order confirmation page sends with the same transaction_id counts once. When the storefront passed the shopper's GA client and session IDs with the cart, the purchase joins that visit and its source; without them it is recorded under a client ID made from the order's ID. GA4 gets the customer ID as the user ID, and no email, phone, name or address.

The Microsoft Ads Conversions API card sends one purchase event to Microsoft Ads for each paid order, when the order is placed, from the store's own server. It reaches Microsoft Ads even when the shopper's browser blocked the UET tag or closed the page first. It is separate from the Microsoft Ads card below: it writes no claim, marks no order and changes nothing the file lists. An order the file lists is sent here too. The two reach Microsoft Ads in different ways, as an event with an event ID and as an offline conversion with a click ID, and the store cannot tell Microsoft Ads they are one sale. Turn on one of them for the sales your campaigns count, or check in Microsoft Ads that each sale counts once.

Each event carries the order's total with two decimals, its currency, the time it was placed and a transaction ID that is the order's ID, such as order_01J8DSHP1043Q7VX2M4K9T. The event ID is ms-purchase- and the same order ID, so a purchase your thank-you page sends to the UET tag with the same ID counts once, and so does a retry. The event also carries what Microsoft Ads uses to find the ad click, each only when the store has it:

  • The Microsoft click ID, msclkid, that the storefront passed with the cart. A leading _uet is taken off, and it is sent only when it is 32 hexadecimal digits, with or without hyphens. An invalid one is left out and the order is still sent.
  • The shopper's email and billing phone number, hashed with SHA-256 before they leave the store. The email gets the same hash as in the Microsoft Ads file. The phone number is sent in international form with a leading +, and is left out when it has fewer than 8 or more than 15 digits.
  • The shopper's IP address and browser, as the storefront passed them or as the order was placed.

An order is sent whether or not it has a click ID, since the email, IP address and browser let Microsoft Ads match the ones the ID misses. An order that has none of these four things has nothing for Microsoft Ads to match, so it is listed as skipped with that reason.

Test orders and orders brought in with Imports are never sent. Microsoft Ads has no test mode, so while the card's Test mode is on, nothing is sent and each order is listed as skipped.

If Microsoft Ads cannot be reached, or answers HTTP 408, 429 or a 5xx, the store tries again with the same event ID: three times at once, then again after 15 minutes, 30 minutes, 1 hour, 2 hours, 4 hours, 8 hours and every 12 hours after that. The delivery stays Failed and its row says when the next try is due, such as "Trying again in 15 minutes." Microsoft Ads refuses an event older than 7 days, so the store stops 7 days after the order was placed, and an order placed longer ago than that is listed as failed without being sent. An HTTP 400 or 401 is not tried again: the row shows the fields and messages Microsoft Ads named. When Microsoft Ads accepts an event and warns that it dropped a field, such as an invalid hash, the delivery is Sent and its row shows the warning.

The Microsoft Ads card sends nothing. Microsoft Ads fetches a file of the store's paid orders on a schedule, and imports each row as an offline conversion with the order's total, its currency, the time it was placed and the shopper's Microsoft click ID. The shopper's email goes with it, hashed with SHA-256. Microsoft Ads offline conversions shows how to set up the schedule and which orders the file lists.

To move your whole EmailOctopus audience into the store's own email marketing, import it instead. The import reads the account with an API key, or with the key saved on this card.

A new lead that gave consent joins the list with the Lead tag, and its source and popup design go in the list fields you name, or as tags such as source: popup when you name none. A shopper who turns on marketing in their account, or ticks the marketing box at checkout, joins with the Sign-up tag. When a shopper who consented places an order, they get the Buyer tag, and a tag for each discount code they used, such as coupon: WELCOME10.

Only consent given at that moment subscribes a contact. A buyer who agreed earlier, as a lead or on their account, gets the tag on the contact they have, so someone who unsubscribed at EmailOctopus stays unsubscribed. The store adds them, as subscribed, only when the list does not have them at all.

With Order history fields on, a consenting buyer's contact also holds their history in your store, in these list fields:

Field What it holds
OrderCount Their paid orders that were not cancelled, imported ones included.
TotalSpent What those orders came to after refunds, in whole units of the order's currency, rounded.
FirstOrderDate and LastOrderDate When they placed their first and their latest order, in UTC.

Use them in EmailOctopus segments, such as buyers whose LastOrderDate is more than 60 days ago. Check the connection makes the fields the list does not have yet. When the list already has one of these fields with another type, the store says which: give OrderCount and TotalSpent the type Number, and the two dates the type Date, in EmailOctopus.

An address on the store's suppression list is never added. When a shopper unsubscribes from a store email or turns marketing off in their account, or you turn it off for them or add their address to the list, the store marks them unsubscribed at EmailOctopus too. When a shopper turns marketing back on in their account, the store takes their address off the suppression list if they had unsubscribed themselves. An address that bounced or complained, or that you added, stays on it.

With a webhook, EmailOctopus tells the store when a contact unsubscribes, bounces or complains. The store puts the address on its suppression list with that reason, so no flow email reaches it, and the customer's Marketing turns off. A contact who joins or rejoins the list at EmailOctopus changes nothing in the store.

  1. On the EmailOctopus card, copy the Webhook URL.
  2. In EmailOctopus, select your name, then Integrations & APIs, then Webhooks, and select Add endpoint.
  3. Paste the URL, tick the email events Unsubscribed, Bounced and Complained, and save the endpoint.
  4. Select View secret beside the endpoint and copy the secret.
  5. On the card, paste it in Webhook secret, then select Save changes.

Last event on the card says when EmailOctopus last posted to the store. The webhook keeps working while the integration is off, so an unsubscribe is never lost, and EmailOctopus tries a request that failed again, up to 9 times over about 10 days. Like the API key, the secret is write only.

Sync contacts… brings the list in line with the store. Use it when you turn EmailOctopus on for a store that already has leads and buyers, or after you turn on Order history fields. The store:

  1. Makes the order history fields the list lacks, when they are on.
  2. Marks every address on its suppression list unsubscribed, except the ones EmailOctopus reported itself.
  3. Sends every live lead who gave consent, every customer whose account accepts marketing, and every buyer who consented, with the tags and fields their own orders and sign-ups give them.

A contact already on the list keeps its status, so the sync never subscribes again someone who unsubscribed at EmailOctopus. Test leads and test orders are never sent, and the integration must be on and out of test mode.

The sync runs in the background and keeps under EmailOctopus's limit of 10 requests a second, so a large list takes a while. Last sync on the card shows how far it got and, once it finishes, how many contacts it added, updated, unsubscribed, skipped and could not send. You can start 4 an hour, one at a time.

Orders brought in with Imports are never sent, and the Microsoft Ads file never lists them.

Microsoft Ads offline conversions

Section titled Microsoft Ads offline conversions

Microsoft Ads imports offline conversions from a file at a web address, on a schedule you set up once in Microsoft Ads. The store serves that file. Each row is a paid order, matched to the ad click by the Microsoft click ID the shopper arrived with, so Microsoft Ads counts the sales its UET tag missed in the browser.

  1. In Microsoft Ads, go to Conversions, then Conversion goals, and select + Create. Choose Offline, and make a goal of the type Offline conversions. Microsoft Ads takes no uploads for a new goal in its first 2 hours.
  2. Check that auto-tagging of the Microsoft click ID is on: under Campaigns, then Settings, then Account level options, the box Add Microsoft Click ID (MSCLKID) to URLs to allow conversion tracking is ticked. Microsoft Ads ticks it unless someone cleared it. With it, every ad click reaches your storefront with an msclkid parameter in its address.
  3. Have your storefront save that msclkid, and where the visit came from as source, with the cart. Send ad tracking with the cart shows how.
  4. In Coritan, open your organization. In the sidebar, select Promotions under Store, then the Integrations tab.
  5. On the Microsoft Ads card, type the goal's name in Conversion goal name, exactly as Microsoft Ads shows it. Left blank, the file uses Offline Purchase.
  6. Turn on the card's first switch, then select Save changes.
  7. A dialog shows the feed URL. Select Copy feed URL, keep the URL until the next step, then select Done. The dialog appears only this once.
  8. In Microsoft Ads, go to Conversions, then Offline conversions, then the Schedules tab, and select + Schedule. Choose HTTPS, paste the feed URL as the file URL and set the upload frequency to daily. The feed needs no user name or password.
  9. Select Save and preview. When the file is right, the preview shows no row errors.

The Uploads tab in Microsoft Ads lists each import. On the card, Last fetch says when Microsoft Ads last fetched the file, or Not fetched yet, and Orders it listed says how many rows that fetch got. Claimed by your storefront says how many orders your storefront claimed in the last 7 days, and when it last did (Count an order on the thank-you page).

Each fetch lists the store's live orders that meet all of these:

  • They are paid, including orders refunded in part.
  • They were placed within Look back: 30 days unless you change it, and at most 90.
  • They were placed at least Wait before listing an order ago: 120 minutes unless you change it, from 60 to 1,440. This gives the thank-you page its turn first.
  • They were placed after Microsoft Ads was last turned on.

The file leaves out test orders, cancelled orders, orders refunded in full, orders brought in with Imports, and every order your thank-you page counted with the UET tag. An order also needs a Microsoft click ID, unless it qualifies for a row by email (List orders without a click ID). Rows are oldest first. Once the file lists an order, it keeps listing it at every fetch within Look back, even after you turn Microsoft Ads off and on again. Microsoft Ads imports a row with the same click ID, goal and time only once.

The file is a CSV. Its first line, Parameters:TimeZone=+0000, says the times are in UTC, and the next line names the columns:

Column What it holds
Microsoft Click Id The msclkid the storefront saved: 32 hexadecimal digits or a GUID, with a leading _uet taken off. Empty on a row listed by email.
Conversion Name Conversion goal name, or Offline Purchase when it is blank.
Conversion Time When the order was placed, in UTC, such as 10/07/2026 14:05:00 (month, day, year).
Conversion Value The order's total in the currency's main unit, with two decimals, such as 24.90.
Conversion Currency The order's currency code, such as EUR.
Hashed Email Address The SHA-256 of the shopper's email address, so the address itself never leaves the store.

Before it hashes an address, the store trims it and puts it in lower case, then takes the dots out of the part before the @ and drops everything there from a + on. Alex.Doe+shop@example.com is hashed as alexdoe@example.com.

List orders without a click ID

Section titled List orders without a click ID

An order may have no usable click ID: the storefront saved none, or saved one in another shape. With List orders by email when there is no click ID on, which it is unless you turn it off, the file still lists such an order, on its hashed email alone, when the visit came from Microsoft: the storefront saved an msclkid, even one that is not valid, or the cart's source names Bing, Yahoo, DuckDuckGo, Ecosia, MSN or AOL. Microsoft Ads then matches the order by the shopper's email. Turn the switch off to list only orders with a click ID.

Count an order on the thank-you page

Section titled Count an order on the thank-you page

When your thank-you page reports purchases with the UET tag too, Microsoft Ads would count an order twice: once from the browser and once from the file. Ask the store first, once the order is placed, and fire the UET purchase event only when the answer is {"fire": true}:

Shell
curl -X POST "https://api.coritan.com/api/v1/orgs/acme/store/orders/order_01J8DSHP1043Q7VX2M4K9T/conversions/microsoft-ads/claim?token=$ORDER_TOKEN" \
  -H "x-publishable-api-key: $PUBLISHABLE_KEY"

The store answers {"fire": true} once for each order: a live, paid order the file has not listed, while Microsoft Ads is on and out of test mode. Every other call answers {"fire": false}. The file never lists an order the browser counted, and the browser never gets true for an order the file listed, so Microsoft Ads counts each sale once. Count a Microsoft Ads purchase once has the rest of the call: the sign-in it takes, its limits and its errors.

Your storefront has to ask. An order that it never asks about is not claimed, so the file lists it, and the UET tag in the browser counts it too. The card then shows both counts, and Microsoft Ads counts the sale twice.

Claimed by your storefront on the card counts the orders claimed in the last 7 days, as 0 in the last 7 days or 12 in the last 7 days, latest with the time of the latest claim. When the file listed orders in the last 7 days and none was claimed, the card shows a warning titled "Your storefront is not claiming orders". It does not appear in test mode or while Microsoft Ads is off.

If you see the warning:

  1. Check that your storefront's code calls the claim route when a shopper places an order, as the request above shows.
  2. If your storefront reads the feed URL from the variable CORITAN_MICROSOFT_ADS_FEED_URL, as the warning says, set that variable. In the dashboard, go to App Deployment, open the storefront's deployment and select its Variables tab. Add the variable with the full feed URL from step 7 of Set up the schedule. Keep it secret, and let only the running app read it. With the Apps API, give it the target runtime (Names your app reads).
  3. Redeploy the app. The variable reaches the app with its next release, so claims start from that time.

The card shows the feed URL in full only once. When you no longer have it, replace it as the next section shows, and put the new URL in the variable.

The token in the feed URL works like a password: anyone with the URL can read the file. The card shows the URL with most of the token hidden. When the URL is lost, or someone who should not have it saw it:

  1. On the Microsoft Ads card, select Replace feed URL…, then confirm.
  2. In the dialog, select Copy feed URL, then Done. The new URL is shown only this once.
  3. In Microsoft Ads, open the schedule and paste the new URL as its file URL.
  4. If your storefront holds the feed URL in CORITAN_MICROSOFT_ADS_FEED_URL, set the new URL there too, then redeploy the app.

The old URL stops working at once, so the schedule fails until it has the new one. Orders the file already listed stay listed. While Microsoft Ads is off, its feed URL answers 404, and turning it on again keeps the same URL.

Try an integration with test mode

Section titled Try an integration with test mode

While Test mode is off, an integration sends live orders and leads only. Test orders and test leads are skipped.

With Test mode on, it sends every order and lead, test ones included, marked so nothing reaches your live reporting:

  • Meta and TikTok get your Test event code, so events appear under Test events in Events Manager. Test mode needs the code.
  • OpenAI Ads checks each event and records none of them.
  • Google Analytics 4 sends each event to the Measurement Protocol's validation server, which records none of them and says what it would refuse.
  • EmailOctopus contacts get the extra tag test.

Google Ads has no test mode, so nothing sent to it can be marked as a test. It never sends a test order, and while its Test mode is on it sends nothing at all: each order is listed as skipped.

Microsoft Ads has no test mode either. Its file never lists a test order. While its Test mode is on, the file has its header and no rows, and the thank-you page's claim answers {"fire": false}, so Microsoft Ads can fetch the file while you set up the schedule without importing a sale. Last fetch on the card still shows each fetch. When you turn Test mode off, the next fetch lists the live orders placed since Microsoft Ads was turned on, including the ones placed while it was in test mode.

The Microsoft Ads Conversions API has no test mode either. It never sends a test order, and while its Test mode is on it sends nothing: each order is listed as skipped.

Send a test event sends one sample order with test mode on, whatever the card says, and tells you what the platform answered. For EmailOctopus, Check the connection reads the list with your API key. You can send 10 tests an hour for each integration. A test is not listed in the deliveries. The Google Ads card has no test, since one would count as a real sale: turn it on and read its deliveries after the next live order. The Microsoft Ads Conversions API card has Check the connection instead: it sends Microsoft Ads an empty batch of events, which counts nothing, and tells you whether Microsoft Ads accepts the token for the UET tag. If Microsoft Ads answers HTTP 400 because the batch is empty, the card still reports the token as accepted. Save the UET tag ID and the token first. The Microsoft Ads card has no test, since Microsoft Ads fetches its file and takes no events: check the file with Save and preview on its schedule.

Deliveries lists what one integration sent, newest first. Choose the integration and a status. The filters are kept in the page address. Show deliveries on a card opens its list. The Microsoft Ads file has no deliveries, since the store sends it nothing: its card says when Microsoft Ads last fetched the file instead.

Status What it means
Sent The platform took the event. Microsoft Ads may accept an event and warn that it dropped a field, such as an invalid hash: the row then shows the warning under Sent.
Failed The platform refused it or could not be reached. The row shows the platform's answer.
Skipped The store did not send it, and says why: a test order while test mode is off, an imported order, no consent, or an address on the suppression list. Google Ads and the Microsoft Ads Conversions API also skip every test order, and every order while their test mode is on. The Microsoft Ads Conversions API also skips an order with no email address, click ID, IP address or browser to match.

A failure the platform may recover from, such as a timeout, an HTTP 429 or a 5xx answer, is tried again, up to three times in all. The Microsoft Ads Conversions API tries again later too, for up to 7 days after the order: what the Conversions API sends has the intervals. A refusal, such as an HTTP 400 for a wrong pixel ID, is not tried again. Each order or lead is sent once per integration.

Send again, on a failed purchase to an ad platform, sends that order once more, as the order and the integration are now, and the row shows the new answer. Use it once you have fixed what the platform refused, or after an outage the tries did not outlast. A Microsoft Ads Conversions API purchase placed more than 7 days ago cannot be sent again, since Microsoft Ads refuses it. The order's ID goes with it again, so the platform still counts the sale once. A sent or skipped delivery has no Send again, nor does EmailOctopus. You need the Admin role, and you can send 60 again an hour for each integration.

Your ad platforms count the store's sales, including the ones a browser pixel missed, and your email list grows with the leads and shoppers who agreed to hear from you.

Save changes names a setting
The value does not have the shape the platform uses, or the integration is on without it. The message says what the setting takes.
Send a test event is greyed out
Save the required setting and the secret first, and save any changes on the card. Meta and TikTok also need the Test event code, since a test is sent in test mode. Hold the pointer over the button to see what is missing.
A test says the platform refused it
The toast shows the platform's answer. An HTTP 400 or 401 usually means the pixel ID or the token is wrong, or the token has no access to that pixel.
Orders show as skipped
They are test orders and test mode is off, or they were imported. Google Ads and the Microsoft Ads Conversions API skip test orders whatever their test mode, and every order while their test mode is on. The Microsoft Ads Conversions API also skips an order that has no email address, click ID, IP address or browser.
Google Ads has no Send a test event
Google Ads has no test mode, so a test would count as a real sale. Turn it on, then read its deliveries after the next live order.
Microsoft Ads does not count the purchases the Conversions API sent
Open Deliveries for the Microsoft Ads Conversions API. A Failed row shows what Microsoft Ads answered: HTTP 401 means the token is wrong or belongs to another UET tag, and HTTP 400 names the field it refused. A row that says "Trying again" is waiting for the next try.
Check the connection says Microsoft Ads refused the token
The token must come from the Conversions API settings of the same UET tag as the UET tag ID. Make a new token there, enter it on the card and save, then check again.
Microsoft Ads cannot fetch the file
The feed URL answers 404 while Microsoft Ads is off or the store is closed, and an old URL answers 404 once you replace it. Turn Microsoft Ads on, or paste the newest URL into the schedule. More than 30 fetches in an hour from one address answer 429.
The file lists fewer orders than you expect
It lists only paid orders placed since Microsoft Ads was last turned on, at least Wait before listing an order ago and within Look back, and each needs a Microsoft click ID or a row by email. An order your thank-you page counted with the UET tag is left out, since Microsoft Ads already has it. In test mode the file lists none. Orders it listed on the card says how many rows the last fetch got.
Save and preview shows row errors
Check that Conversion goal name matches the name of the offline conversion goal in Microsoft Ads exactly, and that the goal is at least 2 hours old.
Microsoft Ads counts some sales twice
The thank-you page fires the UET purchase event without asking the store, or your storefront never asks, so the file lists the order as well. Fire the event only when the claim answers {"fire": true}, as Count an order on the thank-you page shows. Claimed by your storefront on the card counts the orders your storefront claimed in the last 7 days.
The card says "Your storefront is not claiming orders"
The file listed orders in the last 7 days and your storefront claimed none. Follow the steps under Count an order on the thank-you page.
A lead did not reach EmailOctopus
The lead gave no consent, or the address is on the suppression list. The delivery says which.
A shopper who unsubscribed at EmailOctopus still gets the store's emails
The store hears of it only through the webhook. Set it up as Hear back from EmailOctopus shows. Last event on the card says whether EmailOctopus has posted yet. A request with the wrong secret answers 401, which EmailOctopus lists against the endpoint.
Sync contacts… is greyed out
Turn EmailOctopus on, turn Test mode off and save the card first. The button also waits while a sync is running.
The sync stopped
Last sync says why. EmailOctopus refused the API key, or the key has no access to the list: enter a new key, select Check the connection, then start the sync again.
The cards cannot be changed
Changing an integration needs the Admin role.

GET https://api.coritan.com/api/v1/orgs/{org_slug}/commerce/integrations answers every kind (meta_capi, tiktok_events, openai_ads, ga4, google_ads, microsoft_ads, microsoft_capi, emailoctopus and fedex) with enabled, test_mode, config, secret_set and updated_at, never the secret. The dashboard shows the first eight here and fedex on the Fulfilment page. PUT /commerce/integrations/{kind} changes one with any of enabled, test_mode, config and secret; a config key set to null removes it, and "secret": "" clears the secret. A wrong value answers 422 with field, such as config.pixel_id. google_ads and microsoft_ads take no secret: a secret for either, "" included, answers 422 with the field secret. POST /commerce/integrations/{kind}/test sends a test and answers {ok, http_status, error}; for google_ads, which has no test mode, and microsoft_ads, which takes no events, it answers 422 and sends nothing. For microsoft_capi it sends an empty batch instead of an order, which counts nothing, and answers {ok, http_status, error, note}; it answers 422 with the field config.tag_id or secret until both are saved. GET /commerce/integrations/{kind}/deliveries lists the deliveries with the filter status; http_status is the last answer's, for Google Ads the end of its redirect chain. Each delivery has warning, true for a sent delivery whose error holds what Microsoft Ads changed or dropped, which only microsoft_capi has. Its list for microsoft_ads is always empty. POST /commerce/integrations/{kind}/deliveries/{delivery_id}/redeliver sends one failed purchase again and answers {delivery} as the log now shows it; it answers 409 with error not_failed for a delivery that was sent or skipped, not_a_purchase for EmailOctopus or a lead, integration_off, too_old for a microsoft_capi purchase placed more than 7 days ago, or skipped with the reason the order would be skipped now.

microsoft_capi takes tag_id in config (your UET tag ID, 5 to 15 digits, required) and the Conversions API token as secret. The store sends POST https://capi.uet.microsoft.com/v1/{tag_id}/events with Authorization: Bearer <token> once for each paid live order, when it is placed:

Shell
curl -X PUT "https://api.coritan.com/api/v1/orgs/acme/commerce/integrations/microsoft_capi" \
  -H "Authorization: Bearer $CORITAN_TOKEN" -H "Content-Type: application/json" \
  -d '{"enabled": true, "config": {"tag_id": "343267527"}, "secret": "'"$MICROSOFT_UET_CAPI_TOKEN"'"}'

The body of each request is {"dataProvider": "coritan", "data": [event]}, where event has eventType custom, eventName purchase, eventId ms-purchase-<order id>, eventTime in whole seconds since 1970, userData (msclkid, em, ph, clientIpAddress and clientUserAgent, each only when known) and customData (value with two decimals, currency and transactionId, the order's ID). A network error, a timeout, 408, 429 and a 5xx answer are tried again with the same eventId for up to 7 days after the order, and 400 and 401 are not. Test orders, imported orders and every order while test_mode is on are skipped. The secret is write only, like every other kind's.

emailoctopus also takes purchase_fields (true or false, false when unset) in config, and a write-only webhook_secret beside secret ("" clears it; any other kind answers 422 with the field webhook_secret). Its item in the list adds webhook_url, webhook_secret_set, last_webhook_at and sync: null before the first sync, then {status, phase, counts, requested_at, started_at, finished_at, error, last_failure}, where status is queued, running, done or failed and counts holds added, updated, unsubscribed, skipped and failed. Its test also answers list ({name, subscribed, unsubscribed, pending}) and, with purchase_fields on, fields ({created, clashing, failed}, each a list of field tags). POST /commerce/integrations/emailoctopus/sync starts the sync and answers {integration}; 409 with sync_unavailable while the integration is off, in test mode or without its key or list ID, 409 with sync_running while one is queued or running, and 429 after 4 in an hour.

fedex is delivery tracking, not a conversion integration: it receives no events and sends no deliveries. It takes client_id in config (the FedEx API key, 8 to 64 letters, digits, hyphens or underscores) and a secret (the FedEx secret key), and test_mode points it at FedEx's test servers, where nothing is tracked. Its item in the list adds tracking: null before the first run, then {last_run_at, last_result, last_error, checked, delivered} for the latest run. Its test answers {ok, http_status, error} after asking FedEx for a token with the saved keys, and about one tracking number. Track FedEx parcels explains what it checks and when.

EmailOctopus posts its events to POST /api/v1/orgs/{org_slug}/store/webhooks/emailoctopus with no publishable key, signed in EmailOctopus-Signature as sha256= and the hex HMAC-SHA256 of the body under the webhook secret. It answers 200 with {received, suppressed, already, ignored}, 401 with invalid_signature, 404 when the store has no webhook secret, 413 over 2 MB, 422 with invalid_body, and 429 after 600 requests in an hour from one address.

Shell
curl -X PUT "https://api.coritan.com/api/v1/orgs/acme/commerce/integrations/meta_capi" \
  -H "Authorization: Bearer $CORITAN_TOKEN" -H "Content-Type: application/json" \
  -d '{"enabled": true, "config": {"pixel_id": "123456789012345"}, "secret": "'"$META_ACCESS_TOKEN"'"}'

Google Ads is turned on with its send_to alone:

Shell
curl -X PUT "https://api.coritan.com/api/v1/orgs/acme/commerce/integrations/google_ads" \
  -H "Authorization: Bearer $CORITAN_TOKEN" -H "Content-Type: application/json" \
  -d '{"enabled": true, "config": {"send_to": "AW-123456789/AbCdEfGhIjKlMnOp"}}'

microsoft_ads takes conversion_name (1 to 100 characters, Offline Purchase when unset), lookback_days (1 to 90, 30 when unset), browser_grace_minutes (60 to 1440, 120 when unset) and email_only_rows (true unless you set it to false). Its item in the list also has feed_url_masked, the feed URL with most of the token hidden (null until it is first turned on), and last_fetch_at and last_fetch_rows, both null until Microsoft Ads first fetches the file. It also has claims: {window_days, browser, feed, last_browser_at}. window_days is 7. browser counts the orders your storefront claimed in those days, which means the browser fired the UET tag for them. feed counts the orders the file listed in those days. last_browser_at is the time of the latest claim, or null. claims is null in the answer for any other kind. Its PUT answers {integration, feed_url}, and feed_url holds the whole URL only in the answer that turned it on the first time:

Shell
curl -X PUT "https://api.coritan.com/api/v1/orgs/acme/commerce/integrations/microsoft_ads" \
  -H "Authorization: Bearer $CORITAN_TOKEN" -H "Content-Type: application/json" \
  -d '{"enabled": true, "config": {"conversion_name": "Offline Purchase"}}'

The answer's feed_url, such as https://api.coritan.com/api/v1/orgs/acme/store/feeds/microsoft-ads.csv?token=<feed token>, goes into the schedule in Microsoft Ads; every later answer has "feed_url": null. POST /commerce/integrations/microsoft_ads/rotate makes a new URL and answers {integration, feed_url} with it, once, and the old URL answers 404 from then on. Before the first turn-on it answers 409 with no_feed.

Microsoft Ads fetches the file with GET /api/v1/orgs/{org_slug}/store/feeds/microsoft-ads.csv?token=<feed token>. It takes no publishable key, since the token is the credential, and answers text/csv with Cache-Control: no-store. A wrong or missing token, a closed store and an integration that is off all answer 404 with not_found. More than 30 requests in an hour from one IP address answer 429 with rate_limited. A fetch you make yourself counts as a fetch: the orders it lists stay listed, and the card shows it as Last fetch.

API operations on this page

MethodPathWhat it does
GET/api/v1/orgs/{org_slug}/commerce/integrationsEvery kind with whether it is on, test mode, its config and whether a secret is set
PUT/api/v1/orgs/{org_slug}/commerce/integrations/{kind}Turn a kind on or off, set test mode, change its config, set or clear its secret
GET/api/v1/orgs/{org_slug}/commerce/integrations/{kind}/deliveriesWhat the kind sent, skipped or failed to send, newest first
POST/api/v1/orgs/{org_slug}/commerce/integrations/{kind}/deliveries/{delivery_id}/redeliverRedeliver delivery
POST/api/v1/orgs/{org_slug}/commerce/integrations/{kind}/rotateReplace the token in the feed URL, so the old URL stops working
POST/api/v1/orgs/{org_slug}/commerce/integrations/{kind}/syncBring the EmailOctopus list in line with the store, in the background
POST/api/v1/orgs/{org_slug}/commerce/integrations/{kind}/testSend one test event (test mode forced) and answer what the platform said
GET/api/v1/orgs/{org_slug}/store/feeds/microsoft-ads.csvThe store's offline conversions, as the CSV file Microsoft Ads imports on a schedule
POST/api/v1/orgs/{org_slug}/store/webhooks/emailoctopusContact events from EmailOctopus: who left the list, so the store stops emailing them too