GetApplicablePromotions is returning promotions with wrong product - atg

I have created a gift purchase promotion particular items(like on purchase 5 X soaps get 10% discount) and using GetApplicablePromotionNames droplet for displaying those promotions on the items. GetApplicablePromotionNames is returning this promotion for the correct item but not validating pmd rules which has been configured with some customize property.I was validating channel of order should be STORE but for the product promotion displaying for channel=WEB as well.

I suspect you have encountered a known issue with version 10.1.2 with the EverythingQualifierService. The workaround is as follows:
Reconfigure the filters property of the EverythingQualifiesService.properties file to use the EverythingQualifiesService instead of the QualifierService.
There are a number of other known issues with promotions and the full list can be found with Oracle Commerce 10.1.2 Release Notes.

Related

Changing "purchasable" in WooCommerce using REST API

I am trying to update the "purchasable" flag on a product variation using REST API
/wp-json/wc/v3/products/<prodID>/variations/<varID>
I have tried sending a simple
{"purchasable":false}
as well as getting the current data for the variation, changing the "purchasable" entry to the new state, and submitting the entire data back to WooCommerce. In no case have I been able to change this value using REST API.
I am using jw-auth for authentication and have a proper token (I do receive a proper response back with all the data for the variation, but still with the old value of "purchasable" in it, so I know I'm communicating with the back-end).
Is there some setting elsewhere that needs to be set for me to be able to change this specific property? The variations have been created using REST API as well, and on the shop it works fine (I can pick the variations as expected).
What am I doing wrong? Or have I found a bug in WooCommerce? :-)
That field is listed as ReadOnly in the api docs. I believe Woo uses other criteria to set that value. In my research, it appears that setting the Stock Status to "outofstock" seems to be a common method for keeping an item from being purchased. Also, setting the price to null or empty.
https://woocommerce.github.io/woocommerce-rest-api-docs/#product-properties

Not all currencies can be set to a view (profile) via the API

When using the Google Analytics Management API to manage profiles, not all currencies can be set via the API. In the interface there are more currencies available.
The currency type associated with this view (profile), defaults to USD. The supported values are:
ARS, AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, INR, JPY, KRW, LTL, MXN, NOK, NZD, PHP, PLN, RUB, SEK, THB, TRY, TWD, USD, VND, ZAR
In the interface you can set for example LVL or VEF.
Is this a bug? Or what's going on?
Apparently that was an issue with the API.
See the Google Analytics Management API Changelog.
This is a bug fix release; it fixes an issue where a subset of
currencies were supported in the Analytics web
interface but not in the
API.
This release adds support for the following currencies:
UAH, AED, BOB, CLP, COP, EGP, HRK, ILS, MAD, MYR, PEN, PKR, RON, RSD, SAR, SGD, VEF, LVL
For more information see:
The Views (profiles) reference.
The Currency reference help
center article.
It appears to be fixed now.

How can I use automatic bid pricing on the Facebook Ads API?

I'm using the Facebook Ads API to create Page Post Engagement ads. The API is in general a breeze to use but I can't seem to find a way to set automatic bid pricing or, in other words, achieve this:
rather than this, which is what I'm getting:
My ad set is being created with bid_type: "ABSOLUTE_OCPM" and bid_info: "{'ACTIONS':500}". bid_info is a required parameter so I can't leave it out. Setting it to 0 doesn't work either.
Any ideas?
bid_info is required only if you set is_autobid to false, which you need to set to true when you create your set.
With bid_type: "ABSOLUTE_OCPM" and bid_info: "{'ACTIONS':500}" you are saying that you'd like to bid 500 units of account's currency on action, which are expressed in cents. And as you are requesting Optimized CPM, you say how much the fulfillment of a particular goal is worth to you, therefore the $5.00 USD always show up there. As per FB Optimized CPM documentation these values are not bids.
There is no official way to set automatic bid via API. Moreover, usually you can just use oCPM and bid the same amount used by Facebook when you create a campaign using the automatic bid. Then PowerEditor will show you that you're using automatic bid.
=== NEW FROM v2.3 ===
From version 2.3 there is the is_autobid field. By setting it to true Facebook will set the bid value automatically. You can read more here: https://developers.facebook.com/docs/marketing-api/adset/v2.3#create

modify existing promotion, what happens to the user profiles who already have it?

I have created a promotion promoxyz with unilimited access and create coupon couponxyz which uses promoxyz, and gave it to user1 , he used it so promoxyz is saved in his active promotions as unlimited.
No after some time the business wanted the promoxyz to be limited to max use of "1", so the max number of uses is changed to "1" and published through BCC.
Now my question is why is the user1 is able to continue to use it as unlimited, Aparantly the updated promotion has no effect on user1. Is there a way to force the user1 promotions to point the latest setting in this case only once usage ?
Thanks
It is not effected becoz the latest change in the promotion asset is done in the BCC ie., in publishing server .But where as when user1 is using the promotion it is taking this promotion copy from production server.So unless you have the latest copy in production.You cant see the effected change.But still you can go in short cut.There are two ways
Deploy the version of your promotion in production server again.This
is traditional way.
Else go to dyn admin of production and then to
claimable repository/Product catalog (where ever your promotion
repository item is) and use
<update-item item-descriptor="your promo item descriptor" id="your promo id">
<set-property name="global"><![CDATA[false]]></set-property> <!-- Automatically apply to all orders -->
<set-property name="giveToAnonymousProfiles"><![CDATA[false]]></set-property> <!-- Give to anonymous customers -->
</update-item>
and in your API code do grant the promotion explicitly to that user to whom you want to.
PromotionTools.grantPromotion("userId(not login id)", "promotionId");
The recommended approach is to not modify existing promotions.
You should expire the current promotion (by adding an end date), and create a new one with an appropriate start date.

Can PayPal's CUSTOM variable be used on eBay?

I program with PHP and I'm familiar with getting data from PayPal's IPN. I need to send custom data to ebay and get it back when payment is made. For example, if sold 1 Widget on ebay and that widget has a stock number of 12345A, I receive data back from PayPal. I get things like customer's name, address, item name, etc. But, unless I include that stock number in my title, I don't see any way to get that data back from PayPal. I don't want to use ebay's limited title space for including my stock numbers. I realize I could do it if I had another database to store ebay's item numbers and cross reference them with my stock numbers, but I don't want to do that.
I have noticed that when data comes back from PayPal after an ebay sale, it includes the custom variable and that variable has a large number in assigned to it. I have no idea what that is. I've also tried using ebay's custom label feature that's found in Turbo Lister and Selling Manager Pro. I was hoping that would be sent back in PayPal's custom variable, but no luck. Any ideas?
As you've discovered, it looks like it's some internal id number uniquely identifying each eBay order. You can probably forget about specifying a value for this field as it isn't documented anywhere.
The best solution to your problem is to use the eBay API. GetSingleItem will return information about an item given the item id.
The ItemSpecifics list will contain any item specific data that the seller has entered about the product. In my case, I added a custom field called SKU to the eBay item. Just add itemspecifics to your include selector. The call can be executed with a GET request:
http://open.api.ebay.com/shopping?callname=GetSingleItem&IncludeSelector=ItemSpecifics&appid=YOURAPPID=515&ItemID=ITEMIDOFINTEREST
What you get back will contain those custom fields you added to your item:
..
<ItemSpecifics>
<NameValueList>
<Name>MPN</Name>
<Value>MyPartModelA</Value>
</NameValueList>
<NameValueList>
<Name>SKU</Name>
<Value>123-456</Value>
</NameValueList>
</ItemSpecifics>
..