How to specify tax in Gmail Schema.org markup? - gmail

According to this documentation I can specify tax with priceSpecification. And syntax must be for example something like this (delivery charge example):
"priceSpecification": [
{
"#type": "DeliveryChargeSpecification",
"price": "10.00",
"priceCurrency": "USD"
}
]
The only problem is that there is no documentation about which #type for the "tax" must be specified, like in this example with delivery charge DeliveryChargeSpecification.
I tried to find it there and on Schema.org with no success. Any suggestions how is possible to specify tax charge information with Gmail markup?

The vocabulary Schema.org provides three sub-types for the PriceSpecification type:
DeliveryChargeSpecification
PaymentChargeSpecification
UnitPriceSpecification
Unless one of these applies in your case, you should use the parent type,
PriceSpecification.
(If it’s about a price that includes VAT, you can use the corresponding type and its valueAddedTaxIncluded property, which Google seems to support for their email markup.)

Related

Shopware advanced pricing - update rule prices via API

so I got this issue that I have some rules set up for customer groups (each per different sales channel). I then used those rules in advanced pricing tab for some of my products. Now I would like to change the advanced product price for a single rule using API request. From what I understand, it should be possible using 'product-price' endpoint, PATCH method (https://shopware.stoplight.io/docs/admin-api/8fe455ace068a-list-with-basic-information-of-product-price-resources).
I am making a request with payload like below and url https://shop-domain/api/product-price/fda10622ed67472e82d800618b0c36d1:
advanced pricing img
amazon rule img
postman request img -204 No Content
product-price endpoint img
{
"data":
{
"type": "product_price",
"id": "fda10622ed67472e82d800618b0c36d1",
"attributes": {
"productId": "675b627cb3034444af9904bb41901a32",
"ruleId": "ace571bd8e6f48c88f17a551ed1e2654",
"price": [
{
"currencyId": "b7d2554b0ce847cd82f3ac9bd1c0dfca",
"net": 115.44,
"gross": 234.50,
"linked": false
}
],
"quantityStart": 1
}
}
}
... but I am getting no effect and no actual response (response is empty, 204 - No Content). What am I missing? The ultimate goal here for me is to be able to set up different prices for different sales channels like Amazon or eBay for given products. Also, the request I present here is for single update, though it would be better if this could be a bulk request (I've tried /api/_action/sync upserts as well, but I'm not sure how it should be done - documentation here seems to be quite laconic).
The "id" that I'm using here is product price id that I got using GET method on the same endpoint - for listing all product prices from advanced pricing (last image; /api/product-price: https://swagger.docs.fos.gg/).
What am I missing here, how it should be done properly? Should I use customer groups for rules or maybe Sales Channels (if it even makes any difference here)?

DialogFlow parameter on all intents without using context/event

we are using DialogFlow for NLP. Our agent has several hundreds of intent. In many of those we need country parameter available (we are retrieving customers' country during specific interactions/dialogs, for some input channels we are retrieving this information from channel directly, e.g. from whatsapp number, etc.). Is there any way how we could propagate country parameter without using events or contexts to all intents? The motivation is obvious: we do not want to create context on all intent manually, some smart solution would be handy here.
What you can do is to always send a detectIntent request with a yourCustomContext context in req.queryParams.contexts with country parameter, as described here. Then, in any intent you'd like, you can access it as #yourCustomContext.country in the parameters.
The context has the following structure, you can use something like the following:
{
"name": "yourCustomContext",
"lifespanCount": number,
"parameters": {
"country": "Zimbabwe"
}
}
The advantage here is that this custom context is easily extendable, in case you need to send additional details all the time, too.
If you use these parameters in a subsequent webhook call and need more complex JSON structure, you can also use req.queryParams.payload object.
Hope that helps!

Alexa Skill Kit - To save user input

Is there a way to save the user input to a variable in ALexa Skill kit.
Yeah You can do that. You can store any information given by user using slots. You can use built in slots or you can also define your custom slots.
You can use built in slots if you want to get or store numbers or date or name of person etc.
Refer this link for list of Built In slots : https://developer.amazon.com/docs/custom-skills/slot-type-reference.html
If you want to store whole statement given by user then you can use AMAZON.SearchQuery:
As you think about what users are likely to ask, consider using a built-in or custom slot type to capture user input that is more predictable, and the AMAZON.SearchQuery slot type to capture less-predictable input that makes up the search query.
Make sure that your skill uses no more than one AMAZON.SearchQuery slot per intent. The Amazon.SearchQuery slot type cannot be combined with another intent slot in sample utterances.
When you are creating an intent using Skill Builder, you can specify the Slot using curly brackets.
You can also define a Slot Type. You can define your own types or choose from built-in types.
Check the complete list here: https://developer.amazon.com/docs/custom-skills/slot-type-reference.html
From your Alexa skill (lambda function) you capture that a user is saying. You can get it from:
this.event.request.intent.slots.<SlotName>.value
Then you do with the value what do you want.
Update:
Interaction schema would be:
{
"name": "MyColorIsIntent",
"samples": [
"my favorite color is {Color}"
],
"slots": [
{
"name": "Color",
"type": "LIST_OF_COLORS"
}
]
},

Find credit card by type and expiration date

According to this "Account Updater only works with Visa and Mastercard"
So I want to find customers whose cards are going to expire in the next month and are from a different type than Visa or Mastercard.
In the docs I see I can filter by expiration date, but nothing about cardType (it mentions cardholderName)
var stream = gateway.customer.search(function (search) {
search.creditCardExpirationDate().is("12/13");
});
Is there a way I can filter this in the api request or should I need to get all results and filter out Visa and Mastercard customers?
Thanks.
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.
Both you and #michelem are correct: the current api doesn't expose a method for filtering customers based on whether they contain a specific type of card. Your approach of filtering the results based on the Payment method is the best approach.

How to get keyword type (Organic or Paid) from Google Analytics Reporting API

I am using Google Analytics Core Reporting API. I have a little confusion that I want to discuss.
First I want to get keyword which User has searched to reach on my site. I have used ga:keyword. I have also seen one other dimension which is ga:searchKeyword. Which one of these will give me desire result?
Second I want to get keyword type is it organic or paid? If I will use ga:medium then will it give me type of searched keyword?
BTY using following function to get results
private function getResults(&$analytics, $profileId,$data) {
$optParams = array(
'dimensions' => 'ga:visitCount,ga:browser,ga:fullReferrer,ga:keyword,ga:country,ga:campaign,ga:medium'
);
return $analytics->data_ga->get(
'ga:' . $profileId, $data['start_date'], $data['end_date'], 'ga:visits',$optParams);
}
Please guide me.
Best Regards,
ga:searchKeyword is only for keywords from your internal site search. ga:keyword and ga:medium will give the desired result.
According to the documentation, ga:keyword tracks:
When using manual campaign tracking, the value of the utm_term campaign tracking parameter. When using AdWords autotagging or if a visitor used organic search to reach your property, the keywords used by visitors to reach your property. Otherwise the value is (not set).
ga:medium can be used to tell organic search and paid clicks apart. It tracks:
The type of referrals to your property. When using manual campaign tracking, the value of the utm_medium campaign tracking parameter. When using AdWords autotagging, the value is ppc. If the user comes from a search engine detected by Google Analytics, the value is organic. If the referrer is not a search engine, the value is referral. If the visitor came directly to the property, and document.referrer is empty, the value is (none).

Resources