0% found this document useful (0 votes)
79 views8 pages

Consent API with Data Cloud

Uploaded by

picevih793
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views8 pages

Consent API with Data Cloud

Uploaded by

picevih793
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Use the Consent API with Data Cloud

The Consent API supports Data Cloud. Use the Consent API to read and write to
the Data Cloud profile. Contact your Salesforce Representative for consumer
rights guidance within Data Cloud.

Required Permissions
To use Data Cloud parameters for Consent API, you must have either the
ModifyAllData or the ConsentApiUpdate user permission. Requiring a perm
ensures that the Salesforce admin gives explicit permission. These parameters
write org-wide consent data, such as links between records and the value of
consent flags, which are usually inaccessible to non-admin users.

Actions Supported by Consent API with Data Cloud


Action Description

Processing This action is used to restrict processing of data in Data Cloud processes
such as query and segmentation.

Portability This action is used to allow export of Data Cloud profile data.

Shouldforget This action indicates right to be forgotten, which means delete my PII
(Personally Identifiable Information) data and any related records.
Data Cloud Read Parameters
The Consent API allows you to gather information about the Data Cloud profile.
Use the mode and ids Data Cloud parameters as described below.

Syntax
HTTP method
GET
Available since release:
48.0

/services/data/vXX.X/consent/action/processing?ids=<list_of_ids>&mode=<cdp>
/services/data/vXX.X/consent/action/portability?ids=<list_of_ids>&mode=<cdp>
/services/data/vXX.X/consent/action/shouldforget?ids=<list_of_ids>&mode=<cdp>

Note
You can access the consent API using three different URIs based on the Action.
The Actions supported are processing, portability, and shouldforget.
Request parameters

Parameter Description

ids Required. Comma-separated list of IDs. The ID provided must be present in


a field mapped to Individual.Individual Id.
mode Optional. Default is normal. Valid value to retrieve a Data Cloud profile
is cdp.
Read Example
URI
/services/data/v58.0/consent/action/portability?ids=00932I3SU92&mode=cdp

Response
{ "j00932I3SU92" : { "result" : "Success", "proceed" : { "portability" : "true" "portabilityResult" :
"Success" } } }

Write Parameters
The Consent API also allows you to write information to the Data Cloud profile. Use the ids,
mode, and status parameters as described below.

Syntax
HTTP method
PATCH
Available since release
50.0
URI when action is processing.
/services/data/vXX.X/consent/action/processing?ids=list_of_ids&mode=cdp&status=optin or
optout

Request parameters when action is processing

Parameter Description

ids Required. Comma-separated list of IDs. The ID provided must be present in


a field mapped to Individual.Individual Id.
mode Optional. Default is normal. Valid value to use for updating a Data Cloud
profile is cdp.
status Required. Status of the consent. Allowed values are optin or optout.
However, when action is processing use status as optout.
URI when action is shouldforget
/services/data/vXX.X/consent/action/shouldforget?ids=list_of_ids&mode=cdp&status=optin or
optout

Request parameters when action is shouldforget

Parameter Description

ids Required. Comma-separated list of IDs. The ID provided must be present in


a field mapped to Individual.Individual Id.
mode Optional. Default is normal. Valid value to use for updating a Data
CloudCDP profile is cdp.
status Required. Status of the consent. Allowed values are optin or optout.
However, when action is shouldforget use status as optin.

URI action is portability


/services/data/vXX.X/consent/action/portability?ids=list_of_ids&mode=cdp&status=optin or
optout

Request parameters when action is portability

Parameter Description

ids Required. Comma-separated list of IDs. The ID provided must be


present in a field mapped to Individual.Individual Id.
mode Optional. Default is normal. Valid value to use for updating a
Data Cloud profile is cdp.
status Required. Status of the consent. Allowed values are optin or
optout. When action is portability use status as optin.
aws_s3_bucket_id Required only when mode is 'cdp' and the action is 'portability'.
This parameter must be passed in as part of the PATCH request
body. This parameter is used to pass the S3 bucket location for
portability requests to Data Cloud.
Parameter Description

aws_access_key_id Required only when mode is 'cdp' and the action is 'portability'.
This parameter must be passed in as part of the PATCH request
body. This parameter is used to pass the S3 bucket access key for
portability requests to Data Cloud.
aws_secret_access_key Required only when mode is 'cdp' and the action is 'portability'.
This parameter must be passed in as part of the PATCH request
body. This parameter is used to pass the S3 bucket secret access
key for portability requests to Data Cloud.
aws_s3_folder Required only when mode is 'cdp' and the action is 'portability'.
This parameter must be passed in as part of the PATCH request
body. This parameter is used to pass the S3 bucket folder for
portability requests to Data Cloud.
aws_region Required only when mode is 'cdp' and the action is 'portability'.
This parameter must be passed in as part of the PATCH request
body. This parameter is used to pass the S3 bucket's aws region
for portability requests to Data Cloud.

Write Example
When action is processing

/services/data/v58.0/consent/action/processing?ids=100000695&mode=cdp&status=optout
body: {}
When action is portability
/services/data/v58.0/consent/action/portability?ids=100000695&mode=cdp&status=optin
body:{
"aws_s3_bucket_id" : "cdpgdprtest",
"aws_access_key_id": "AKIAS4AK7TBJBHUPOBEI",
"aws_secret_access_key": "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",
"aws_s3_folder": "yyun/Person",
"aws_region": "us-west-1"
}

When action is shouldforget


/services/data/v58.0/consent/action/shouldforget?ids=100000695 &mode=cdp&status=optin
body: {}

Requesting Data Deletion or Right to Be Forgotten


Learn more about how to submit Data Deletion requests in Data Cloud.

You can submit Data Deletion requests for Individual profiles in Data Cloud. All
requests must be submitted using the Consent API.

A Data Deletion request deletes the specified Individual entity and any entities
where a relationship has been defined between that entity's identifying attribute
and the Individual ID attribute.

WARNING
If an individual has data stored in a Data Stream that isn’t mapped to the Individual entity, the Consent API doesn’t
remove that data.

Data Deletion requests are reprocessed at 30, 60, and 90 days to ensure a full
deletion. You must submit any data deletion requests in all connected systems
and Salesforce clouds.
Step by Step Implementation as per above information as follows.

Step 1

First execute a Write api Call with a patch method and keeping body as {}

PATCH call with shouldForget and status=optin -->

/services/data/v54.0/consent/action/shouldforget?ids=<individualID>&mode=cdp&status=optin

This call will create a consent record which can then be modified, added a
screenshot. This will create a Consent API.

Example: tested in sandbox with below link

https://accenture-
cc.lightning.force.com/services/data/v54.0/consent/action/shouldforget?ids=001Dn00000Vwir
kIRR&mode=cdp&status=optin

In this link

• This is endpoint https://accenture-cc.lightning.force.com and


• This is write action
/services/data/v54.0/consent/action/shouldforget?ids=001Dn00000VwirkIRR&mode=cd
p&status=optin
Step 2

Read API call with Get method which will be used to read the Consent details.

GET call with portability:

/services/data/v54.0/consent/action/portability?ids=<individualID>&mode=cdp

Example: tested in sandbox with below link

https://accenture-
cc.lightning.force.com/services/data/v54.0/consent/action/portability?ids=001Dn00000VwirkIRR&mode
=cdp&status=optin

In this link

• This is endpoint https://accenture-cc.lightning.force.com and


• This is Read action

/services/data/v54.0/consent/action/portability?ids=<individualID>&mode=cdp

Once we complete this steps Profile data which we want to modify/delete will be deleted
within next 24hours from the DMO.

Referred links below.

Use the Consent API with Data Cloud | REST API Developer Guide | Salesforce Developers

Requesting Data Access and Export (salesforce.com)

Requesting Restriction of Processing (salesforce.com)

Requesting Data Deletion or Right to Be Forgotten (salesforce.com)

You might also like