DocuSign REST API: Adding a Carbon Copy Recipient With Document Visibility - rest

I can successfully add recipients to an existing DocuSign envelopes using REST API. When I add a signer to the envelope I am also able to specify the Document Visibility using excludedDocuments element. However I cannot set the document visibility using this parameter for the carbon copy recipient. My business requirement is that one carbon copy recipient should not receive some of the documents in the envelope.
Below is my JSON request:
{
"carbonCopies": [
{
"email": "123#hotmail.com",
"excludedDocuments": [
"1"
],
"name": "testCC1",
"recipientId": "5"
}
],
"signers": [
{
"email": "123#gmail.com",
"excludedDocuments": [
"1"
],
"name": "ssgmail signer",
"recipientId": "7"
}
]
}
Both the above recipients are added successfully. The first recipient(signer) is setup properly without visibility to document 1. The second recipient(carbon copy) is set up with full visibility.
Interestingly I can go to DocuSign interface and correct the envelope to remove the visibility for the carbon copy recipient. So I think DocuSign does support this functionality.
Any idea how I can add/change the visibility of individual documents for the carbon copy recipient for an existing envelope using the rest / soap API?
Note:-
Frankly I do not know how to query the document visibility in an envelope/recipient using API. For this I go to the "View/Modify Document Visibility" link in the correct envelop screen to check the current visibility setting.
I have set the the Document Visibility to "Must Sign to View Unless Sender Account" to enable the Document Visibility feature.

You are missing one property in the JSON Request, "enforceSignerVisibility":true, I have below request which is working fine with DocumentVisibility:
{
"documents": [
{
"documentBase64": "<Base64>",
"documentId": "1",
"fileExtension": "docx",
"name": "Challenge3"
},
{
"documentBase64": "<Base64>",
"documentId": "2",
"fileExtension": "docx",
"name": "Challenge4"
}
],
"emailSubject": "Test Subject",
"recipients": {
"signers": [
{
"email": "Signer#gmail.com",
"name": "Signer",
"recipientId": "2",
"routingOrder":1,
"excludedDocuments":[2],
"tabs": {
"signHereTabs": [
{
"documentId": "1",
"recipientId": "1",
"xPosition": "300",
"yPosition": "300",
"pageNumber":1
}
]
}
}
],
"carbonCopies": [
{
"email": "CC#gmail.com",
"name": "CC",
"recipientId": "1",
"routingOrder":1,
"excludedDocuments":[1]
}
]
},
"status": "sent",
"enforceSignerVisibility":true
}

Related

How to properly pass the session_id to GA4 via Measurement protocol

GA4 purchase events are sent from client server via measurement protocol. But there is no session_id parameter in the queries, because of that source and medium is lost. We tried to pass the session_id parameter in MP request, but no data were received.
Example of submitted request:
{
"timestamp_micros": "1664522406546590",
"non_personalized_ads": false,
"events": [
{
"name": "purchase_balance_top_up",
"params": {
"user_id": "11111111",
"crm_id": "11111111",
"balance": 990,
"payment_method": "paymore"
}
}
],
"client_id": "1119492379.1652295143",
"session_id": "1664522264",
"user_id": "11111111"
}
Attaching a screenshot of the raw data from BigQuery on events sent by MP.
Screenshot of the raw data from BigQuery
Help, how to properly pass the session_id? Or how to make sure that events don't lose source param?
We found a solution to the problem. It's simple. The parameter "session_id" must be passed inside the array "params" of the event.
Here is an example of the correct event data array to be sent via measurement protocol:
{
"timestamp_micros": "1664522406546590",
"non_personalized_ads": false,
"events": [
{
"name": "purchase_balance_top_up",
"params": {
"user_id": "11111111",
"crm_id": "11111111",
"balance": 990,
"payment_method": "paymore",
"session_id": "1664522264"
}
}
],
"client_id": "1119492379.1652295143",
"user_id": "11111111"
}
Actually we are sending purchase events similarly with such request:
{
"client_id": "xxx.xxx",
"user_id" : "xxxx",
"non_personalized_ads": false,
"user_properties": {
"user_id_dimension": {
"value": "xxxx"
}
},
"events": [{
"name": "purchase",
"params": {
"currency": "USD",
"transaction_id": "T_12345",
"value": 12.21,
"engagement_time_msec": 10,
"session_id": "XXXXXXXXXX",
"items": [
{
"item_name": "Top-up"
}
]
}
}]
}
but we are not sending timestamp_micros. And we send 'user_id_dimension' as user property with the same value as 'user_id' parameter to observe user id further in Exploration reports. We've created user-scoped custom dimension in GA4 interface with dimension name User ID and this user property 'user_id_dimension'. Everything works

How to delete user by email id using azure SCIM api in databricks?

I need to know if there is a way to delete a user from databricks using email only using SCIM api? As of now I can see it can only delete user by ID which means I need to first retrive the ID of the user and then use it to delete.
I am using this api from powershell to delete users by email.
https://learn.microsoft.com/en-us/azure/databricks/dev-tools/api/latest/scim/scim-users
If you look into the documentation for Get Users command of SCIM Users REST API, you can see that you can specify the filtering condition for it. For example, to find specific user, you can filter on the userName attribute, like this:
GET /api/2.0/preview/scim/v2/Users?filter=userName+eq+example#databricks.com HTTP/1.1
Host: <databricks-instance>
Accept: application/scim+json
Authorization: Bearer dapi48…a6138b
it will return a list of items in the Resources section, from which you can extract user ID that you can use for delete operation:
{
"totalResults": 1,
"startIndex": 1,
"itemsPerPage": 1,
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:ListResponse"
],
"Resources": [
{
"id": "8679504224234906",
"userName": "example#databricks.com",
"emails": [
{
"type": "work",
"value": "example#databricks.com",
"primary": true
}
],
"entitlements": [
{
"value": "allow-cluster-create"
},
{
"value": "databricks-sql-access"
},
{
"value": "workspace-access"
}
],
"displayName": "User 1",
"name": {
"familyName": "User",
"givenName": "1"
},
"externalId": "12413",
"active": true,
"groups": [
{
"display": "123",
"type": "direct",
"value": "13223",
"$ref": "Groups/13223"
}
]
}
]
}

includeInDownload not work - Supplemental Document

I have an envelope with some documents, and one of them I do not want to be concatenated when you download the documents using the combined option. By reading the documentation, I found the includeInDownload attribute that can be passed to the documents when creating an envelope. But when I am creating the envelope, it seems that this attribute is being ignored, because after creating the envelope, I search the documents and the includeInDownload attribute is true. The envelope creation JSON:
{
"status": "created",
"emailSubject": "Example envelope",
"emailBlurb": "Example",
"documents": [{
"documentId": "1",
"name": "Test 1",
"remoteUrl": "URL"
},
{
"documentId": "2",
"name": "Test 2",
"remoteUrl": "URL",
"includeInDownload": "false"
}],
"recipients": {
"signers": [{
"name": "Lisa Simpson",
"email": "lisa#email.com",
"recipientId": "1",
"clientUserId": "1"
}]
}
}
You need to use the 'display' attribute as well for what we call "supplemental" documents.
If display=modal, the associated document is a supplement.
If display=inline, it’s not a supplement.

Docusign REST API attachment

What I am trying is, send a document with an attachment placeholder to the recipients so that, when they open the DocuSign mail, they can able to attach additional documents.
What I have done is, created an envelope and get the envelopId in the response
{
"status": "sent",
"emailSubject": "Example of one recipient, type signer",
"documents": [{
"documentId": "1",
"name": "contract.pdf",
"documentBase64": "base64 document bytes...",
}],
"recipients": {
"signers": [{
"name": "Lisa Simpson",
"email": "lisa#email.com",
"recipientId": "1",
"routingOrder": "1",
"tabs": {
"signHereTabs": [{
"xPosition": "150",
"yPosition": "200",
"documentId": "1",
"pageNumber": "1"
}],
}
}]
}
}
for attaching attachment, from the documentation I got
PUT /v2/accounts/{accountId}/envelopes/{envelopeId}/attachments
But, the thing I can not understand that, I create an envelope with a document and send it to the recipient, then I get an envelopeId
After that, why I should put the attachment placeholder? The envelope (DocuSign mail) already sent to the recipient.
How can I send an attachment placeholder via DocuSign REST API?
Envelope Attachments are metadata. I think you want to have the recipient upload and attach a file to the envelope? To do so, you add a "signerAttachment" tab. The tab will need to be placed somewhere on your document. The account configuration option to either append the uploaded file to the document hosting the signerAttachment tab or to add the file as another document in the envelope will affect how you get the uploaded document back.
"tabs": {
"signHereTabs": [{
"xPosition": "150",
"yPosition": "200",
"documentId": "1",
"pageNumber": "1"
}],
"signerAttachmentTabs":[{
"xPosition": "150",
"yPosition": "500",
"documentId": "1",
"pageNumber": "1"
}]
}

docusign api tabs wont populate

I've built a create envelope API call that has 7 tabs, I set the values but two fields will not populate. Company and Title are always blank. I set the tab labels programmatically from the /envelopes/{templateId} API request so I know it is correct.
{
"emailSubject": "Test Email",
"emailBlurb": "This is for testing docusign api",
"templateId": "cf5a9348-0d05-44ab-b0ac-8847303aa0ba",
"templateRoles": [
{
"email": "swilliams#email.com",
"name": "Shawn Williams",
"roleName": "Signee",
"tabs": {
"fullNameTabs": [
{
"tabLabel": "Name 67755b0d-2284-4f20-acab-9ea4391f0e15",
"value": "Shawn Williams"
}
],
"companyTabs": [
{
"tabLabel": "Company f9d5d265-9d97-42ba-a6ec-0d36f38b1017",
"value": "SD"
}
],
"titleTabs": [
{
"tabLabel": "Title 35713ae4-3330-4864-b37c-066873fc0d6e",
"value": "MR"
}
],
"ssnTabs": [
{
"tabLabel": "SSN",
"value": "123-45-6789"
}
],
"firstNameTabs": [
{
"tabLabel": "F_Name",
"value": "Shawn"
}
],
"lastNameTabs": [
{
"tabLabel": "L_Name",
"value": "W"
}
],
"emailAddressTabs": [
{
"tabLabel": "Email",
"value": "swilliams#email.org"
}
]
}
}
],
"transactionId": "test-20-id",
"status": "sent"
}
Thank you in advance for your help.
Not all DocuSign tabs can be populated. Some are calculated based on Recipients data and User Profile.
From Documentation :
Some tabs automatically populate with the recipient's data (such as emailTabs or fullNameTabs) while others require the signer to enter some information (textTabs) or make a choice (listTabs, checkboxTabs, radioGroupTabs).
If you want to populate data during envelope creation, textTabs might be a better choice.
Also see these related answers
Full list of tabs whose values can be set
Answer Two