I have an agreement that I need signed. The link to the document is opened up after the Client provides their company and payment information for our services. How can I pass values like company name or billing address to the document from a form?
Right now the Client clicks the "Go to Agreement" and it brings up the document. The problem lies in that they would be having to re-type the information they just submitted on our form again in the echosign document.
You can use the mergeFieldInfo for this
A sample Payload for the same
{
"documentCreationInfo": {
"fileInfos": [
{
"libraryDocumentId": "xxxxxxxxxx"
}
],
"name": "xxxxxxxxxx xxxxxxxxxx",
"message": "Please sign the agreement",
"recipientSetInfos": [
{
"recipientSetRole": "SIGNER",
"recipientSetMemberInfos": [
{
"email": "xxxx#xxxx.com"
}
]
}
],
"signatureType": "ESIGN",
"signatureFlow": "SENDER_SIGNATURE_NOT_REQUIRED",
"mergeFieldInfo": [
{
"fieldName": "firstName",
"defaultValue": "xxxx"
},
{
"fieldName": "lastName",
"defaultValue": "xxxx"
},
{
"fieldName": "email",
"defaultValue": "xxxx#xxxx.com"
},
{
"fieldName": "phone",
"defaultValue": "xxxxxxxxxxxxxxxxx"
},
{
"fieldName": "companyName",
"defaultValue": "xxxx"
},
{
"fieldName": "companyAddresss",
"defaultValue": "xxxx xxxx"
}
],
"securityOptions": {
"passwordProtection": "NONE",
"kbaProtection": "NONE",
"webIdentityProtection": "NONE",
"protectOpen": false,
"internalPassword": "",
"externalPassword": "",
"openPassword": ""
}
},
"options": {
"noChrome": false,
"authoringRequested": false,
"autoLoginUser": false
}
}
You can use POST /agreements API for this purpose. The request body of this API call has an optional paramenter called "formFields", here you can provide form-fields that you want to embeed on your document before sending the agreement for signing, you can also customize those fields by setting different properties to them like location, defaultValue, readOnly and many more.
For you use-case, you can pass this optional parameter while creating the agreement in POST call, specifying the field's default value that you took from user in the previous steep and the exact location where you want that field to be placed on the document, If you don't want the user to change those fields you can even mark them as read only.
To make it more convenient for you PFB the request snippet that you should provide in your POST call -
{
"formFields": [{
"alignment": "LEFT",
"borderStyle": "SOLID",
"fontColor": "",
"fontName": "",
"borderColor": "",
"displayLabel": "",
"radioCheckType": "CIRCLE",
"calculatedExpression": "",
"backgroundColor": "#0715cd",
"formatData": "",
"displayFormat": "",
"contentType": "DATA",
"validated": false,
"calculated": false,
"maxLength": -1,
"locations": {
"height": 20,
"width": 20,
"pageNumber": 1,
"left": 100,
"top": 100
},
"minLength": -1,
"name": "Custom Field 2",
"inputType": "TEXT_FIELD",
"customDateFormat": "",
"specialFormula": "",
"required": true,
"defaultValue": "",
"minNumberValue": 0,
"maxNumberValue": 0,
"regularExpression": "",
"showOrHide": "SHOW",
"specialErrMsg": "",
"format": "NONE",
"fontSize": -1,
"masked": false,
"anyOrAll": "ANY",
"displayFormatType": "DEFAULT",
"conditions": {
"value": "",
"whenFieldLocationIndex": -1,
"fieldName": "",
"whenFieldName": "",
"operator": ""
},
"validationRule": "None",
"readOnly": false,
"borderWidth": -1,
"hidden": false,
"visibleOptions": [],
"hiddenOptions": [],
"tooltip": "This is a sample.",
"recipientIndex": 1
}]
}
Related
I am new in bigcommerce and type to added complex-rules for Modifier of product. below provide the URL of API URL and JSON.
every time give error "The rule must contain multiple modifier conditions with unique modifier ids or a variant condition and modifier condition"
https://api.bigcommerce.com/stores/{$$.env.store_hash}/v3/catalog/products/{product_id}/complex-rules
Please help where I wrong in send Complex Rule request JSON.
Modifier:
{
"data": {
"config": [],
"display_name": "Donation",
"id": 188,
"name": "Donation1645178599-166",
"option_values": [
{
"adjusters": {
"image_url": "",
"price": null,
"purchasing_disabled": {
"message": "",
"status": false
},
"weight": null
},
"id": 352,
"is_default": true,
"label": "$5 Donation",
"option_id": 188,
"sort_order": 0,
"value_data": null
},
{
"adjusters": {
"image_url": "",
"price": null,
"purchasing_disabled": {
"message": "",
"status": false
},
"weight": null
},
"id": 353,
"is_default": false,
"label": "$10 Donation",
"option_id": 188,
"sort_order": 0,
"value_data": null
}
],
"product_id": 166,
"required": false,
"sort_order": 0,
"type": "dropdown"
},
"meta": {}
}
Complex Rule request JSON:
{
"product_id": 166,
"sort_order": 0,
"enabled": true,
"stop": false,
"purchasing_disabled": false,
"purchasing_hidden": false,
"price_adjuster": {
"adjuster": "relative",
"adjuster_value": 6
},
"weight_adjuster": {
"adjuster": "relative",
"adjuster_value": 6
},
"conditions": [
{
"id": 5,
"rule_id": 5,
"modifier_id": 189,
"modifier_value_id": 352
}
]
}
Error output:
{
"status": 422,
"title": "The rule must contain multiple modifier conditions with unique modifier ids or a variant condition and modifier condition",
"type": "https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes"
}
I asked this question also in the node-red forum, but there is not much activity (compared to stackoverflow). So I try it here again. The motivation of my question is, that I sometime loose the connection to an OPC-UA-Server that requires restart of the flow to work again. I want to do this automatically in background, because the rare restart of the flow is no big issue - so I can live with it.
There is a thread https://discourse.nodered.org/t/how-to-restart-flows-automatically/12993 that is not really finished or solved.
I implemented the last example, but get error 400, so automatic restart of flow doesn't work. Is there any fool proof description how to do this?
EDIT:
This is the code:
[
{
"id": "3623f8cf.b4d2b8",
"type": "subflow",
"name": "restart flows",
"info": "",
"category": "",
"in": [
{
"x": 40,
"y": 80,
"wires": [
{
"id": "f24fbf79.77a74"
}
]
}
],
"out": [
{
"x": 960,
"y": 80,
"wires": [
{
"id": "cb4d3992.931138",
"port": 0
}
]
}
],
"env": [
{
"name": "user",
"type": "str",
"value": ""
},
{
"name": "password",
"type": "str",
"value": ""
}
],
"color": "#FF8888",
"inputLabels": [
"Injection"
],
"icon": "node-red/alert.svg"
},
{
"id": "f24fbf79.77a74",
"type": "function",
"z": "3623f8cf.b4d2b8",
"name": "Request Token",
"func": "var user = env.get('user');\nvar pass = env.get('password');\n\nif(user === undefined || user === null)\n{\n user = 'adminuser';\n}\nif(pass === undefined || pass === null)\n{\n pass = 'adminpass';\n}\n\nmsg.payload = {\n \"client_id\": \"node-red-editor\",\n \"grant_type\": \"password\",\n \"scope\": \"*\",\n \"username\": user,\n \"password\": pass\n}\nreturn msg;\n\n/*\nmsg.payload = {\n \"client_id\": \"node-red-editor\",\n \"grant_type\": \"password\",\n \"scope\": \"*\",\n \"username\": \"type or username\",\n \"password\": \"type your password\"\n}\nreturn msg;\n*/",
"outputs": 1,
"noerr": 0,
"x": 200,
"y": 80,
"wires": [
[
"3aedf561.e16f4a"
]
]
},
{
"id": "3aedf561.e16f4a",
"type": "http request",
"z": "3623f8cf.b4d2b8",
"name": "Token",
"method": "POST",
"ret": "txt",
"paytoqs": false,
"url": "http://servername:port/auth/token",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"x": 390,
"y": 80,
"wires": [
[
"388fe2f5.639eee"
]
]
},
{
"id": "388fe2f5.639eee",
"type": "function",
"z": "3623f8cf.b4d2b8",
"name": "Confirm token",
"func": "// get the status of the request\nvar status = msg.statusCode;\nvar token = '';\nmsg.headers ={};\n\n//let node = feedback;\n\nswitch(status){\n case 200:\n node.log(\"Secure restart\");\n token = JSON.parse(msg.payload);\n token = 'Bearer '+token.access_token;\n msg.headers = {\n \"Authorization\": token,\n \"Node-RED-Deployment-Type\":\"reload\"\n }\n msg.payload =\"\";\n break;\n case 204:\n node.log(\"Secure without restart\");\n global.set('result','\tSuccess - with no further content');\n break;\n case 400:\n node.warn(\"Bad request\");\n break;\n case 401:\n node.warn(\"Not authorized\");\n break;\n case 403:\n node.warn(\"Forbidden\");\n break;\n case 404:\n node.log(\"Unsecure restart\");\n msg.headers = {\n \"Node-RED-Deployment-Type\":\"reload\"\n }\n break;\n case 409:\n node.warn(\"Version mismatch\");\n break;\n case 500:\n node.error(\"Server Error\");\n break;\n default:\n node.warn(\"Unknown Error\");\n break;\n}\n\nmsg.payload = \"\";\n\nsetTimeout(function() { node.send(msg) }, 10000);\n\nreturn null;",
"outputs": 1,
"noerr": 0,
"x": 580,
"y": 80,
"wires": [
[
"cb4d3992.931138"
]
],
"info": "Restart of Node-Red flows.\nWill check if the action needs security or not.\nNote: if the first 5 attemps return a statuscode 403 'forbidden'\nthen the server will break and only way to recover is then to\nrestart the service"
},
{
"id": "cb4d3992.931138",
"type": "http request",
"z": "3623f8cf.b4d2b8",
"name": "Restart",
"method": "POST",
"ret": "txt",
"paytoqs": false,
"url": "http://servername:port/flows",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"x": 780,
"y": 80,
"wires": [
[]
]
}
]
The settings.js file is as follows:
adminAuth: {
type: "credentials",
users: [
{
username: "adminuser",
password: "adminpass",
permissions: "*"
},
Hope this helps.
I'm tring to modify category fields of a contact app using Podio API.
I get the following response for the GET request (https://api.podio.com/app/22768616/field/189304190):
(Previously I created the field with a POST request and everything works fine)
{
"status": "active",
"type": "category",
"field_id": 189304190,
"label": "myCategories",
"config": {
"default_value": null,
"unique": false,
"description": null,
"hidden_create_view_edit": false,
"required": false,
"mapping": null,
"label": "myCategories",
"visible": true,
"delta": 9,
"hidden": false,
"settings": {
"multiple": false,
"options": [
{
"status": "active",
"text": "Cat1",
"id": 1,
"color": "DCEBD8"
},
{
"status": "active",
"text": "Cat2",
"id": 2,
"color": "DCEBD8"
},
{
"status": "active",
"text": "Cat3",
"id": 3,
"color": "DCEBD8"
},
{
"status": "active",
"text": "Cat4",
"id": 4,
"color": "DCEBD8"
}
],
"display": "dropdown"
}
},
"external_id": "mycategories-2"
}
If I send a PUT request to https://api.podio.com/app/22768616/field/189304190 with the same response, the dropdown category field changes to an inline category field and all the options are deleted. (I expected nothing would happen to my field, I also tried to modify the text of the options, but got the same result).
{
"status": "active",
"type": "category",
"field_id": 189304190,
"label": "myCategories",
"config": {
"default_value": null,
"unique": false,
"description": null,
"hidden_create_view_edit": false,
"required": false,
"mapping": null,
"label": "myCategories",
"visible": true,
"delta": 0,
"hidden": false,
"settings": {
"multiple": false,
"options": [
{
"status": "deleted",
"text": "Cat1",
"id": 1,
"color": "DCEBD8"
},
{
"status": "deleted",
"text": "Cat2",
"id": 2,
"color": "DCEBD8"
},
{
"status": "deleted",
"text": "Cat3",
"id": 3,
"color": "DCEBD8"
},
{
"status": "deleted",
"text": "Cat4",
"id": 4,
"color": "DCEBD8"
}
],
"display": "inline"
}
},
"external_id": "mycategories-2"
}
Could you please help with any example to update a category fields correctly?
Can you add what the body is when you are using the PUT endpoint?
My guess is that you are somehow not mapping the "settings" parameter correctly. Per the API documentation the settings parameter for a category field should follow this format:
{
"options": The list of options for the question
[
{
"id": The id of the option, only use this for existing options,
"status": The current status of the option, "active" or "deleted", only use this to delete options,
"text": The text for the option (required)
},
... (more options)
],
"multiple": True if multiple answers should be allowed, False otherwise
}
I was searching the web for a long time. I'm trying to put if and else statements into this selenium IDE. The program itself doesn't provide any parameters, hints, or help. I saw a lot of results online where it's just java code, however I don't see anyway to enter code here.
Can someone show me an example of how to use this if and then statement?
Basic if condition example:
Example .side file. Save the below code in file with name as 'Test.side' and open in selenium ide
{
"id": "92a8cfe0-a7ed-45a4-82c2-59f889cba0a6",
"version": "1.1",
"name": "test",
"url": "",
"tests": [{
"id": "f78b739a-886c-4842-9d61-f83700ef29f6",
"name": "test",
"commands": [{
"id": "ff43b0cf-7207-4599-8f11-3f90102cd1e2",
"comment": "",
"command": "open",
"target": "https://in.yahoo.com",
"targets": [],
"value": ""
}, {
"id": "12efa973-069b-4254-9813-868d4a34876d",
"comment": "",
"command": "storeTitle",
"target": "",
"targets": [],
"value": "title"
}, {
"id": "abde904f-6f3f-4a5a-b24a-59c3b2eafe2c",
"comment": "",
"command": "if",
"target": "${title} != 'Google'",
"targets": [],
"value": ""
}, {
"id": "bb6640f2-6356-439f-b226-287030e8fa5a",
"comment": "",
"command": "open",
"target": "https://www.google.com",
"targets": [],
"value": ""
}, {
"id": "ee3b8144-4981-460d-b707-e925e52ebe41",
"comment": "",
"command": "assertTitle",
"target": "Google",
"targets": [],
"value": ""
}, {
"id": "f73c9836-4944-45aa-be07-9647991ffb36",
"comment": "",
"command": "end",
"target": "",
"targets": [],
"value": ""
}, {
"id": "bcc2bd2b-5091-4b40-b499-f89c38e532bf",
"comment": "",
"command": "sendKeys",
"target": "name=q",
"targets": [],
"value": "Hello world"
}]
}],
"suites": [{
"id": "e966e7ba-8ccd-418a-80e7-f99ac6c25f90",
"name": "Default Suite",
"persistSession": false,
"parallel": false,
"timeout": 300,
"tests": ["f78b739a-886c-4842-9d61-f83700ef29f6"]
}],
"urls": [],
"plugins": []
}
If with else Example
Example .side file.
{
"id": "92a8cfe0-a7ed-45a4-82c2-59f889cba0a6",
"version": "1.1",
"name": "test",
"url": "",
"tests": [{
"id": "f78b739a-886c-4842-9d61-f83700ef29f6",
"name": "test",
"commands": [{
"id": "ff43b0cf-7207-4599-8f11-3f90102cd1e2",
"comment": "",
"command": "open",
"target": "https://www.google.com",
"targets": [],
"value": ""
}, {
"id": "12efa973-069b-4254-9813-868d4a34876d",
"comment": "",
"command": "storeTitle",
"target": "",
"targets": [],
"value": "title"
}, {
"id": "abde904f-6f3f-4a5a-b24a-59c3b2eafe2c",
"comment": "",
"command": "if",
"target": "${title} == 'Google'",
"targets": [],
"value": ""
}, {
"id": "bb6640f2-6356-439f-b226-287030e8fa5a",
"comment": "",
"command": "echo",
"target": "I am in Yahoo Page",
"targets": [],
"value": ""
}, {
"id": "ee3b8144-4981-460d-b707-e925e52ebe41",
"comment": "",
"command": "assertTitle",
"target": "Google",
"targets": [],
"value": ""
}, {
"id": "f73c9836-4944-45aa-be07-9647991ffb36",
"comment": "",
"command": "else",
"target": "",
"targets": [],
"value": ""
}, {
"id": "a90e7c75-911a-46cb-ac52-a3fd394e6dfe",
"comment": "",
"command": "echo",
"target": "I am in already in google Page",
"targets": [],
"value": ""
}, {
"id": "2b29d6fe-a670-4349-be18-794e85fbd498",
"comment": "",
"command": "end",
"target": "",
"targets": [],
"value": ""
}, {
"id": "7f8ee438-4dae-4f34-b4b6-7a4a166acabf",
"comment": "",
"command": "sendKeys",
"target": "q=name",
"targets": [],
"value": ""
}]
}],
"suites": [{
"id": "e966e7ba-8ccd-418a-80e7-f99ac6c25f90",
"name": "Default Suite",
"persistSession": false,
"parallel": false,
"timeout": 300,
"tests": ["f78b739a-886c-4842-9d61-f83700ef29f6"]
}],
"urls": [],
"plugins": []
}
If with ElseIf Example
Example selenium ide test file (.side)
{
"id": "92a8cfe0-a7ed-45a4-82c2-59f889cba0a6",
"version": "1.1",
"name": "test",
"url": "",
"tests": [{
"id": "f78b739a-886c-4842-9d61-f83700ef29f6",
"name": "test",
"commands": [{
"id": "ff43b0cf-7207-4599-8f11-3f90102cd1e2",
"comment": "",
"command": "open",
"target": "https://www.google.com",
"targets": [],
"value": ""
}, {
"id": "12efa973-069b-4254-9813-868d4a34876d",
"comment": "",
"command": "storeTitle",
"target": "",
"targets": [],
"value": "title"
}, {
"id": "abde904f-6f3f-4a5a-b24a-59c3b2eafe2c",
"comment": "",
"command": "if",
"target": "${title} == 'Google'",
"targets": [],
"value": ""
}, {
"id": "bb6640f2-6356-439f-b226-287030e8fa5a",
"comment": "",
"command": "echo",
"target": "I am in Yahoo Page",
"targets": [],
"value": ""
}, {
"id": "ee3b8144-4981-460d-b707-e925e52ebe41",
"comment": "",
"command": "assertTitle",
"target": "Google",
"targets": [],
"value": ""
}, {
"id": "f73c9836-4944-45aa-be07-9647991ffb36",
"comment": "",
"command": "elseIf",
"target": "${title} != 'Yahoo'",
"targets": [],
"value": ""
}, {
"id": "a90e7c75-911a-46cb-ac52-a3fd394e6dfe",
"comment": "",
"command": "echo",
"target": "I am in google Page",
"targets": [],
"value": ""
}, {
"id": "2b29d6fe-a670-4349-be18-794e85fbd498",
"comment": "",
"command": "end",
"target": "",
"targets": [],
"value": ""
}, {
"id": "bcc2bd2b-5091-4b40-b499-f89c38e532bf",
"comment": "",
"command": "echo",
"target": "I am out side the if condition",
"targets": [],
"value": ""
}]
}],
"suites": [{
"id": "e966e7ba-8ccd-418a-80e7-f99ac6c25f90",
"name": "Default Suite",
"persistSession": false,
"parallel": false,
"timeout": 300,
"tests": ["f78b739a-886c-4842-9d61-f83700ef29f6"]
}],
"urls": [],
"plugins": []
}
Using the V2 DocuSign REST API, is it possible to get a list of users who have the "send on behalf of" and "account wide" permission?
Looking through the docs, I see that the Get User List method does not return any permission info. The Get User Information method returns a little more but nothing permission specific, other than a permissionProfileId for each group.
So is it possible to get permission info with user data? Or is there a method I can call using the permissionProfileId to check if a user has those permissions?
What I am ultimately trying to do is get a list of users who are able to use the "Send on behalf of" feature which requires the "send on behalf of" and "account-wide rights" permissions.
You can get a list of all users and their User Settings with below rest method as an DS Admin:
https://demo.docusign.net/restapi/v2/accounts/[accountid]/users/?additional_info=true
Sample output below:
{
"users": [
{
"userName": "DocuSignTest2 User-2",
"userId": "b67aa83b-2b3e-4669-a897-89e44b5724c2",
"userType": "CompanyUser",
"isAdmin": "False",
"userStatus": "Created",
"uri": "/users/b67aa83b-2b3e-4669-a897-89e44b5724c2",
"email": "youremail#yourdoman.com",
"firstName": "DocuSignTest2",
"lastName": "User-2",
"userSettings": [
{
"name": "canManageAccount",
"value": "false"
},
{
"name": "canSendEnvelope",
"value": "true"
},
{
"name": "locale",
"value": "en"
},
{
"name": "canSendAPIRequests",
"value": "false"
},
{
"name": "apiAccountWideAccess",
"value": "false"
},
{
"name": "enableVaulting",
"value": "false"
},
{
"name": "vaultingMode",
"value": "none"
},
{
"name": "enableTransactionPoint",
"value": "true"
},
{
"name": "enableSequentialSigningAPI",
"value": "true"
},
{
"name": "enableSquentialSigningUI",
"value": "true"
},
{
"name": "enableDSPro",
"value": "false"
},
{
"name": "powerFormAdmin",
"value": "false"
},
{
"name": "powerFormUser",
"value": "true"
},
{
"name": "canEditSharedAddressbook",
"value": "use_private_and_shared"
},
{
"name": "canManageTemplates",
"value": "create"
},
{
"name": "enableSignOnPaperOverride",
"value": "false"
},
{
"name": "enableSignerAttachments",
"value": "true"
},
{
"name": "allowSendOnBehalfOf",
"value": "false"
},
{
"name": "allowRecipientLanguageSelection",
"value": "true"
},
{
"name": "selfSignedRecipientEmailDocument",
"value": "include_pdf"
}
],
"sendActivationOnInvalidLogin": "false",
"enableConnectForUser": "false",
"groupList": [
{
"groupId": "128693",
"groupName": "Everyone",
"groupType": "everyoneGroup"
}
],
"workAddress": {
"address1": "",
"address2": "",
"city": "",
"stateOrProvince": "",
"postalCode": "",
"phone": "",
"country": ""
},
"homeAddress": {
"address1": "",
"address2": "",
"city": "",
"stateOrProvince": "",
"postalCode": "",
"phone": "",
"country": ""
}
},
[rest removed for sake of example]
There is not one call that can complete this task.
My recommendation is to put all of these users in a Group and then you can query who is in the group through the API.
Example get list of user's per group:
GET https://{server}.docusign.net/restapi/v2/accounts/{accountId}/groups/{groupId}/users
If you want to audit the group or see who you need to move into the group you can get a list of users and then look at user details per user (loop through programmaticaly).
Example get user settings to check userSettings->allowSendOnBehalfOf :
GET https://{server}.docusign.net/restapi/v2/accounts/{accountId}/users/{userId}