Create a Product Audience with Facebook Power Editor - facebook-ads-api

According to Facebook Product Audience documentation, one can create an audience to target people who, for example, have added a product to basket but not purchased it.
This can be done through product_audiences endpoint with:
inclusions=[{"retention_seconds": 86400,
"rule": {"event": {"eq": "AddToCart"}}}]
exclusions=[{"retention_seconds": 172800,
"rule": {"event": {"eq": "Purchase"}}}]
This also can be done directly within adcampaigns endpoint with (see here):
"product_audience_specs": [{
"product_set_id": <PRODUCT_SET_ID>,
"inclusions": [..]
}]
The problem is: it seems that there is no way to create those Product Audiences with the Power Editor. The use of the API seems compulsory. Is it true?
For info: Power Editor can create Custom Audience, something like "target someone who've view product 1 and 2", but it's not as fine grained as Product Audience

Ok, this is only available — for now on — in the api.
See here for the related issue.

Related

Get teamId in message extension handler

When developing a message extension for Microsoft Teams, is it possible to retrieve the ID of a team where the user is invoking the message extension command without first adding the bot to that team?
I can do this when the bot is added to the team manually based on TeamsInfo.getTeamDetails(), however, I don't really need (or want) to add the bot to the team for my goal. All I need is the channel ID (which is available from the context/conversation) and the ID of the underlying team. Retrieving the team details without the bot being added beforehand errors with "The bot is not part of the conversation roster".
Have a look at the ChannelData property on the Activity class, that should give what you need. You can read more about it here.
Here's an example of the underlying payload, for interest:
"channelData": { "eventType": "channelCreated", "tenant": { "id": "72f988bf-86f1-41af-91ab-2d7cd011db47" }, "channel": { "id": "19:693ecdb923ac4458a5c23661b505fc84#thread.skype", "name": "My New Channel" }, "team": { "id": "19:693ecdb923ac4458a5c23661b505fc84#thread.skype" } }
we had the same trouble with the Team documentation and APIs.
However for that specific case, we found a solution that may work for you. I will say is more a hack than a solution. But it worked on my use case. It will only work on messages with attachments.
When the context is received in a message, the message contains an attachments array. Each attachment object has a contentUrl. Inside that url is the mailNickname for the group. That mailNickname field represents a readeable unique id. The format is something like sites/{mailNickname}/General.
from there you can retrieve the field and use the Groups Graph API.
With a query like this one:
https://graph.microsoft.com/v1.0/groups?$filter=startswith(mailNickname, 'themailNicknameFromcontenturl')
You will get the group full information, including the aadGroupId
In general, is a nightmare to work with Teams documentation. Hope this hack helps you.

How to search Zoho custom module using API v2?

I am using an access token with ZohoCRM.modules.custom.READ.
When I send a GET request to https://www.zohoapis.com/crm/v2/Custom/search, I get the following error.
{
"code": "INVALID_MODULE",
"details": {},
"message": "the module name given seems to be invalid",
"status": "error"
}
What am I doing wrong and how do I define the module I am trying to pull data from (it is called CustomModule2)?
Figured it out...
First, needed to go to https://crm.zoho.com/crm/{org_id}/settings/modules to find the actual name of CustomModule2 which is Adresses livraison.
Then, needed to go to https://crm.zoho.com/crm/{org_id}/settings/api/modules to find the API name for Adresses livraison which is Adresses_livraison.
Finally, needed to go to https://crm.zoho.com/crm/{org_id}/settings/api/modules/CustomModule2?step=FieldsList to find the API name of the field I wanted to use as a search criteria (it was Compte].
The final query using httpie is as follows.
http GET https://www.zohoapis.com/crm/v2/Adresses_livraison/search \
Authorization:"Zoho-oauthtoken {access_token}" \
criteria=="(Compte:equals:{account_id})"
Zoho is up there in the most awkward developer experiences I have encountered.
Just an update for anyone still looking into this, because I noticed that the links aren't always the same, depending on whether it's a sandbox or not, etc. So the steps are:
Go to your CRM page/dashboard and click on the Settings (cogwheel icon) on the top-right, next to your account image.
A bunch of items in panel boxes open. In the panel named "Developer Space" choose APIs
There it opens a bunch of tabs and sub-tabs and a Dashboard (As shown on the image below). The "Dashboard" sub-tab should be selected, all you have to do is switch to the sub-tab "API-Names"

How to create interest in interest category?

As per below link create interest functionality is nto avaialable.
http://developer.mailchimp.com/documentation/mailchimp/reference/lists/interest-categories/interests/#
But using API playgroung you can create interest. Even tried with REST api and I am able to create interest. Please let me know if "create interest " API has been removed from above page.
I think it never wasn't on that page. This new API Documentation lacks many things that are possible.
If you want to create new interest you can just POST to this endpoint:
/lists/{list_id}/interest-categories/{interest_category_id}/interests
Example request body:
{
"list_id": "id_of_the_list",
"name": "name of the interest",
"display_order": 1
}
So the answer for your question is that I am pretty sure they just haven't created documentation for that one yet.

Magento Shipping Exception

I've been trying for the last week to find a way in Magento to have some conditions for shipping. What I mean:
whenever a certain product is shipped to a certain country I want Magento to use a specific courier but I don't want it to be shown on any other products.
The problem is that we don't have one storage place, we have many in different countries. Let's take England as an example. I have a bag that is made in UK. Worldwide delivery is set to a fixed amount using UPS. But I have another deal with a local courier. And I want these products (that are made in UK) to be shipped with this courier IF they are shipped in the UK.
I tried adding an attribute to these, but I don't find an action to show this method. Also, for other products or if the address is not in England this method should not be displayed.
It is possible do it with Magento shipping extension. You can try those free shipping extensions, or ask for trial of extensions that need pay.
I recommend use Owebia Shipping 2 which need a lit bit 'code' to program your shipments.
and you also need add new product attribute for define where this product made. Usually this attribute select type is a drop-down list.
Assume this product attribute code is made_from and attribute value is UK. here is the simple code for condition you mentioned:
Let's take England as an example. I have a bag that is made in UK. Worldwide delivery is set to a fixed amount using UPS. But I have another deal with a local courier. And I want these products (that are made in UK) to be shipped with this courier IF they are shipped in the UK.
here is the code for this example:
{
"outsideUK": {
"label": "UK local carrier",
"conditions": "{shipto.country_id} == 'GB'",
"fees": "1000"
}
}
Play with this extension if you interesting. I will update more detail if I got time.

Can't add Subject text to Regarding field in Dynamics CRM Activity

I've added several Subjects under the Admin section of Dynamics CRM. I'd really like to add one of these "Subjects" to the Regarding field within an Activity. E.g. someone called, and it was related to "ProductX".
Strangely, the entity type "Subject" does not appear when trying to select an item for the field. A range of other entity types such as "Contacts" and "Accounts" appear.
Does anyone know why Subjects can't be selected here? I would have expected this was OOB functionality.
That because it doesn’t really make sense to have activities regarding a subject.
An activity only really makes sense in the context of something else, and that something else is generally a real thing in the world or a piece of work. The Regarding field really says: "This Activity involves working on this thing".
For example, if John Smith rings your company, it makes sense to create a new Phone Call activity that Regards the Contact record of John Smith. With this approach you can see the entire activity history against a Contact. By making the Phone Call regard the Contact you are saying this piece of work is about the Contact.
If the Phone Call was Regarding a Subject, it would be saying, "This Phone Call involves working on the Subject", which isn’t true, its work about the Contact. Also you lose the ability to track correspondence with the contact.
So my suggestion would be, use the Regarding field to link to people and things, and add a relationship between your activities and subject if you want to classify your phone calls.
As a side, there is a product entity in CRM (it can’t be Regarding however), so perhaps you should create a relationship to that.

Resources