Time to read: 7 min.
The article covers the following topics:
- Sync rules: what it is and how it works
- Sync rules section overview
- Short description of each Sync Rule category
- Sync rules frequency changing
- Sync rule as Always: peculiarities
- Working with particular Sync rules
Sync rules: what it is and how it works
Sync rules are the set of rules that influence the offer settings when pulling it from CPAPI to Affise. Sync rules are located on the new Campaign setup page as well as on the existing Campaign edit page.
The main goal of Sync rules is to manage synchronization frequency for specific offer fields in Affise.
We highly recommend getting familiar with our guide on general principles of CPAPI working before starting to read the rest of the article.
Sync rules section overview
Sync rules are used to manage synchronization frequency for specific offer fields in Affise. The frequency is determined by:
- First Sync - the relevant field will be pulled to Affise offer the first time it appears in the source API response.
- Always - the relevant field will be pulled or updated in Affise offer each time synchronization occurs.
- Disabled - the relevant field will never be pulled or updated in Affise offer each time synchronization occurs.
Here you can find a short description of each Sync Rule category:
- Categories - this section can be used to group offers according to their verticals.
- Description - offer description: Offers -> Edit -> General -> Description.
- Payments - the following fields are synced: country, OS, devices, total, payouts, currency, payment type.
- Status - the status assigned to an offer that is being pulled from CPAPI to Affise and will be set forcefully. Leave it 'According to the source' to get the advertiser's accurate offer status only.
- URL - you can find the main 'Tracking URL' here.
- Caps - only these parameters are synced: timeframe, type, value, goal, countries, affiliate
As CPAPI uses Affise API for affiliates the validation on caps exists. Here you can find out which cap rules are taken by CPAPI via API according to cap types, country, etc.
- Smartlink Categories - defines the smartlink category that an offer will be assigned to in Affise. At first, Smartlink Category should be created in your Affise system (Smartlinks - > Add).
- Traffic Targeting - Sync rule is used to manage synchronization frequency for Geo Restrictions. For more information about Targeting Synchronization In CPAPI, see the following link.
- Landings - this Sync rule is available only for Affise <-> Affise integration. It pulls Landing pages set up here:
- Countries - Country GEO restrictions to filter all offers approved on a source side based on country targeting.
- Is CPI - has an informative purpose. Shows the model of payment for affiliates who use your API.
- Payments Goal - the goal value to be returned in the goal parameter of a postback when the target action is completed. The default value is 1. 'Payment Goal' synchronization disabling requires disabling of 'Caps' Sync rule.
- Title - offer title.
- URL Preview - this setting has the following functions: 1) in some cases, it works like Trafficback 2) and if you go through this link in the Affiliate panel, you can see what this offer is in general.
- KPI - has an informative purpose.
We support multilanguages description only for the Affise<>Affise Integration.
- Redirect Type - the offer redirect type, which will be assigned to an offer in Affise and will be set forcefully.
- Privacy level - the level of privacy assigned to an offer that is being pulled from CPAPI to Affise: public, pre-moderation, and private.
- Notes - additional notes, which the Advertiser can pass inside his offer.
- Impression Destination URL - the link, which the Advertiser gives you to let you send information about impressions to him.
- Allow impressions - allows impressions tracking in Affise. Check the guide on impressions out.
If you set up values in some field in the Default values section in the Campaign, but the namesake Sync rule is set up as Disabled, the value will not be applied: the offer will be pulled with a default value. For instance: you set up Meta-redirect in Redirect Type field in Default values section, but the Redirect Type Sync rule is for disabled - the offer will contain HTTP 302 redirect as it is the default one.
Sync rules frequency changing
When you change sync rule frequency (e.g. from Always to First Sync), mind that the changing will be applied for all imported offers. Imported offers are those, which CPAPI takes from the advertiser's feed. If the campaign contains 100 offers, but the advertiser gives 90 offers in his API feed, changes will be applied for 90 offers only.
Sync rule as Always: peculiarities
Let's take a look at an example: in the Campaign, you have all Sync rules as the First Sync (or Disabled) except only one: Title. You changed the Title in the offer manually/via API in Affise. These changes will remain till the moment when the Advertiser changes anything else (for instance, Caps) on his side. CPAPI will notice such changes. As a Sync rule for Caps is as First Sync, Caps won't be updated, but new Title in Affise will be erased (brought back to version the Advertiser has now), as the Sync rule for Title is as Always. This principle is applied to all Sync rules the Campaign has.
Let’s look at several particular cases you might face when working with CPAPI:
Case No. 1: You have the Title Sync rule as Always and the Cap Sync rule as First Sync, and you’ve changed the Title manually/via Api in Affise. CPAPI made an Api call to the Advertiser and didn’t find any changes at all in Caps - all values in Caps remain the same. Your Title will remain the same at least till the next Api call CPAPI will make.
Case No. 2: You have the Title Sync rule as Always and the Cap Sync rule as First Sync, and you’ve changed the Title manually/via Api in Affise. CPAPI made an Api call to the Advertiser and found that the Advertiser did not pass Caps as a whole parameter (there are no both parameters and the value in it). Your Title will remain the same at least till the next Api call CPAPI will make.
Case No. 3: You have the Title Sync rule as Always and the Cap Sync rule as First Sync, and you’ve changed the Title manually/via Api in Affise. CPAPI made an Api call to the Advertiser and found that the Advertiser passed the empty Caps parameter without any value. Your Title will remain the same at least till the next Api call CPAPI will make.
Changes are counted for even if the Advertiser passes ‘-’ or ‘0’ - any value matters.
Case No. 4: You have the Title Sync rule as Always and the Cap Sync rule as First Sync, and you’ve changed the Title manually/via Api in Affise. CPAPI made an Api call to the Advertiser and found changes in Caps. It does not matter which frequency has the Sync rule for Caps - your Title will be erased (brought back to the version the Advertiser has).
Working with particular Sync rules
Privacy level Sync rule: if this Sync rule is set up as Disabled, all offers will be pulled to Affise as Public.
URL & Impression Destination URL Sync rule: as you can set up parameters and macros for both links on the Demand Source setting page, you need to be aware of the following:
- If the Sync rule is set up for Disable, both links won't be updated with parameters and macros you've set up.
- If the Sync rule is set up for First sync, both links will be updated with parameters and macros only once. If you update parameters and macros on the Demand Source setting page after they were pulled to Affise, they won't be updated once again.
- If the Sync rule is set up for Always, both links will be updated with parameters and macros each time when you update them on the Demand Source setting page.
Redirect type Sync rule: if this Sync rule is set up as Disabled, all offers will be pulled to Affise with HTTP 302 redirect type.
Payments Goal Sync rule: if you make it disabled initially when the Campaign creates, all offers will contain ‘1’ as a goal value by default.
Payments Goal & Caps Sync rules: these both Sync rules have mutual validation:
- If Caps is for the First Sync, Payments Goal can be set up as the First Sync as well as Always
- If Caps is for Always, Payments Goal can be Always only
- If Caps is for Disabled, Payments Goal can be set up as the First Sync, Always and Disable
Caps Sync rule: if this Sync rule is set up as First sync/Always, but 'Overcap' flag is OFF in Default values, offers won't have Overcap turned on.
Traffic targeting Sync rule: check our detailed guide out to find more details about this Sync rule working.
If you use CR Automation/Click Automation, it is better to use Traffic targeting Sync rule as the First Sync. Otherwise, blocked sub2 values will be erased each time when CPAPI pulls the offer in Affise.
The following articles can be helpful:
- Step 3: New Campaign setup
- CPAPI synchronization process
- Targeting synchronization in CPAPI
- Click automation
If you have some questions regarding Sync rules work please, contact the Support Team via email@example.com or your Dedicated Account Manager.
Updated by Lizaveta Talkachova