What field should I use when collecting external system user info in SF Marketing Cloud? - salesforce

I've been wondering which field should I use when collecting user purchases, views, etc. There are a couple of different resources in Salesforce about this and both of them tell differently.
First one is under Email Recommendations -> Implementation, inside marketing cloud itself:
And it says that Subscriber Key should be used.
The other one is from Salesforce Docs (https://help.salesforce.com/s/articleView?id=sf.mc_ctc_set_user_info.htm&type=5):
This one says that Subscriber ID should be used.
As far as I understand it, these two are completely different. I use Contact Id from Salesforce as my SubscriberKey and I think Subscriber Id is generated inside marketing cloud itself.
The JSON itself has a field that's named "email" - the name suggests that email should be used.

Related

azure data factory - salesforce lookup

I am utilizing azure data factory upsert salesforce.
I have two tables in salesforce
contacts__c (holds the the individual first and last name )
contactdetails__c (holds additional information about contact)
since I can not use dataflows directly with salesforce (for lookup), I upsert contact__c (sourcesystemid__c hold our internal contact ID).
when trying upsert contactdetails__c, I have to perform a lookup on the fly to know the salesforce internal ID associated for each contact and use that to upsert contactdetails__c.
I saw article suggesting to use contact__r.sourcesystemid__c which doesn't work for me .
I use copy data activity for contactdetails with source being my data in azure sql (with our internal contact ID) and sink is contactdetails__c on the mapping of the contactID I use
source sink
contactid contact__r.sourcesystemid__c
but it doesn't work
would appreciate any suggestion as to how I can lookup internal id of contact while upserting contactdetails table
thanks
Your question is missing a lot of details. I do not know how you are trying to do this, but assuming you are using the REST API then take a look at the section named Upserting Records and Associating with an External ID of this document.
One question... Why are you using custom sObjects for this? Why not use the standard Contact sObject. Also having the data denormalized like you are indicating is a bad idea in Salesforce.

How to find Uniqueness in Azure Usage Records from Billing APIs

I am building an Azure Chargeback solution and for that I am pulling the Azure Usage data from Azure Billing REST APIs for multiple subscriptions and different dates. I need to store this into custom MS SQL database as per customer’s requirements. I get various usage records from Azure.
Problem: From these Usage records, I am not able to find any combination of the columns in the data I receive which will give me a
Unique Key to identify a Usage record for a particular subscription
and for a specific date. Only column I see as different is Quantity
but even that can be duplicated. E.g. If there are 2 VMs of type A1
with no data or applications on them, in the same cloud service, then
they will have exact quantity of usage. I do not get the exact name
of the VM or any other resource via the Usage APIs.
One Custom Solution (Ineffective): I can append a counter or unique ID to the usage records but if I fetch the data next time the
order may shuffle or new data may be introduced thereby affecting the
logic for uniqueness. Any logic I build to checking if any data is
missing in DB will result in bugs if there is any alteration in the
order the usage records are returned (for a specific subscription for
a specific date).
I am sure that Microsoft stores this data in some database. I can’t find the unique id to identify a usage record from many records returned by the Billing API. Maybe I am missing something here.
I will appreciate any help or any pointers on this.
When you call the Usage API set the ShowDetails parameter to true: &showDetails=true
MSDN Doc
This will populate the instance data in the returned JSON with the unique URI for the resource which includes the name for example:
Website:
"instanceData": "{\"Microsoft.Resources\":{\"resourceUri\":\"/subscriptions/xxx-xxxx/resourceGroups/mygoup/providers/Microsoft.Web/sites/WebsiteName\",\"...
Virtual Machine:
"instanceData": "{\"Microsoft.Resources\":{\"resourceUri\":\"/subscriptions/xxx-xxxx/resourceGroups/TESTINGBillGroup/providers/Microsoft.Compute/virtualMachines/TestingBillVM\",\...
If ShowDetails is false all your resources will be aggregated on the server side based on the resource type, all your websites will show as one entry.
The resource URI, date range and meterid will form a unique key as far as I know.
NOTE: If you are using the legacy API your VMs will be aggregated under the cloud service hosting them.

Is it possible to update/delete User by externalId

We are trying to develop a SCIM enabled Provisioning system for provisioning data from an Enterprise Cloud Subscriber(ECS) to Salesforce(Cloud Service Provider-CSP). We are following SCIM 1.1 standard.
What are we able to do:
We are able to perform CRUD operations on User object using Salesforce auto-generated userId field
Exact Problem:
We are not able to update/delete User object using externalId provided by ECS.
Tried something as below... But it is not working, Unknown_Exception is thrown...
XXX/my.salesforce.com/services/scim/v1/Users/701984?fields=externalId
Please note that it is not possible to store Salesforce userId in ECS's database due to some compliance reasons. So we have to completely depend upon externalId only.
Possible Workaround:
Step1: Read the userId based on externalId from Salesforce
Step2: Update the User object using the salesforce UserId obtained in Step1.
But this two step process would definitely degrade the performance.
Is there any way to update/delete the User by externalId
Could you please guide us on this..
Thanks so much....
I realize this is old thread but wanted to note that you CAN update Users from REST using an external ID. The endpoint in above question is incorrect. Following is how it should be set, send as a PATCH request:
[instance]/services/data/v37.0/sobjects/user/[external_id__c]/[external id value]
Instance = your instance i.e. https://test.salesforce.com/
external_id__c = API name of your custom external Id field on User
external id value = whatever the value of the user's external Id
NOTES:
Salesforce responds with an HTTP 204 status code with No Content in the body, this isn't usual for patch requests, but it is 'success' response
The external id on user has to be a custom field, make sure it is set
as UNIQUE
Ensure the profile/permission set of the user that is making the call
has the Manage Users permission & has access to the external id field
It is pretty common pattern for other applications, too, to search first and then perform on update on the returned object. Your workaround seems fine to me. What performance problem are you concerned about? Are you concerned about Salesforce not being able to process more requests or are you concerned about the higher response time in your application because you need to make multiple requests? Have you actually measured how much an extra call costs?

Can I include a custom payload or value with amazon affiliate links?

I'd like to be able to tag affiliate links with some extra information so that I can map successes to information inside of my system.
Is there any way I can include a custom identifier or payload of data with the affiliate link that Amazon will allow me to inspect when I receive a report of successful sales?
The only thing I found is the tracking ids from
Manage Your Tracking IDs page.
However this ids are limited to 100 values by default (you need to contact amazon for more). This is what they answered me:
I understand you'd like to view reporting within Products Advertising
API.
All reports are housed on your Associates account for you to view the
activity of your links.
We do offer multiple tracking IDs so that Associates can track the
activity of individual links easily and accurately.
You can create up to 100 tracking IDs in your account by visiting the
Account Settings section of Associates Central. You'll find a link in
the Account Information section labeled Manage your tracking IDs:
https://affiliate-program.amazon.com/gp/associates/network/your-account/manage-t...
Once you've created your additional tracking IDs, to view these IDs,
please log into Associates Central (http://associates.amazon.com).
Once logged in, click on the drop down box under Tracking ID to change
which ID you are working with.
If you are interested in receiving more than 100 tracking IDs, please
first create this amount via your associate account in Associate
Central. If you have already created 100 tracking IDs in your account
and are needing additional tracking IDs, please use the link below to
write back to us with a detailed description of how you'll be using
these additional ID:

Unique customer identifier in Amazon Marketplace Web Services

I am importing customers from Amazon to do an integration with our ordering system and want to avoid having duplicate customers as we do a high volume of sales on Amazon.
Is there any report, or API that will allow me to get a unique customer identifier that will never change for that customer no matter how many orders are placed?
I have thought of the anonymous email that Amazon makes available, however I am unsure if this changes, or if it is a static value as it is not referenced within the API documentation.
Has anyone else found a solution for this, or have any suggestion?
the key is buyer-email and is available from order reports or from amazon fulfilled shipments data report.
The amazon fulfilled shipments data report will not contain buyer email information in certain circumstances, however the order reports will always contain the buyer email.
Amazon's FAQ documentation states:
Are there separate e-mail addresses per thread? No. The anonymised e-mail alias remains the same for all contacts that you have with each individual buyer. Use the buyer's anonymised e-mail address as a unique identifier to follow conversations across multiple orders.

Resources