I have a connect endpoint created and I am trying to differentiate between a digitally signed envelope, and one where the document was downloaded and reuploaded using the Print and Sign feature.
Currently it seems that I get onSigningComplete event in both cases mentioned above when the document is submitted.
I also see that the status of the envelope gets set to Completed when I receive the connect response at my end point.
My questions are as follows:
Is this the expected behavior, or am I missing something?
Is there some flag in the envelope that indicates that a document was downloaded, signed and uploaded vs. signed digitally? If yes, how do I get that flag in my connect end point?
You can refer to https://docs.docusign.com/esign/restapi/Envelopes/Envelopes/listAuditEvents/
and call endpoint
GET /v2/accounts/{accountId}/envelopes/{envelopeId}/audit_events
to get list of audit events happened for that envelope, for eg: it will show you list of events for Print and Sign like:
a. {
"name": "Action",
"value": "Printable Copy Delivered"
},
{
"name": "Message",
"value": "Signer1 received a printable copy of the envelope"
}
b. {
"name": "Action",
"value": "Uploaded Attachment"
},
{
"name": "Message",
"value": "Signer3 uploaded a file that contains paper with hand signature"
}
These audit events will show if document was download, signed & uploaded vs signed digitally
Related
I published a bot using the Azure bot framework to the Azure cloud servers, and made an application that uses the Direct Line API 3.0 to send user responses and receive bot messages through HTTP requests. Everything works except that I'm not sure how to get the starting message of the bot at the start of the conversation. I open the conversation with the /v3/directline/conversations endpoint, but I'm not sure how to receive the first message of the bot (that is normally sent without any user interaction). A message request after opening the conversation doesn't include any bot responses, but the next message request after sending the first user input includes the first two messages of the bot (starting message and response to the user).
EDIT: From reading this I came to the conclusion that it will be easier to just use a custom event as a trigger for the welcome message. I updated my bot as follows to reflect this within bot composer, adding a new CUSTOM event trigger with a test response message:
However, I still can't seem to trigger this event via the Direct Line API. Currently, I send a request as follows, following the event activity structure:
{
"type": "event",
"channelId": "directline",
"from": { "id": "UnityUserId", "name": "Unity User 1" },
"value": "test",
"name": "welcome"
}
I then get a response with ID, normally indicating that the request was successfull. However, upon requesting the bot response messages, I get the following:
{
"activities": [
{
"type": "event",
"id": "5FZsHpWBxm1hjhWQYY7gr-eu|0000000",
"timestamp": "2022-04-09T14:39:15.90169Z",
"serviceUrl": "https://directline.botframework.com/",
"channelId": "directline",
"from": {
"id": "UnityUserId",
"name": "Unity User 1"
},
"conversation": {
"id": "5FZsHpWBxm1hjhWQYY7gr-eu"
},
"value": "test",
"name": "welcome"
}
],
"watermark": "0"
}
Indicating that the bot has no responses, which doesn't seem quite right when looking at the bot composer screenshot above. Is there something wrong with my current method?
Regards
The onMembersAdded event usually does the trick. Sample code is in https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-send-welcome-message?view=azure-bot-service-4.0&tabs=csharp
I thought I remembered seeing the bot's welcome message when using Direct Line, so I tried to quickly repro it again. I connected a simple echo bot via Direct Line. Then I created a conversation, sent a simple message, and then retrieved all activities (all via REST calls), and the bot's welcome message was indeed present in the response, as you can see in this screenshot:
Perhaps you should use these Direct Line 3.0 API reference docs as opposed to the one you linked above. I followed these steps using the basic Echo bot sample, Postman, and a bot resource in Azure for simple and easy testing, but you could use a full application if you wish.
I need to get accurate inventory numbers via the Acumatica API so that I can update inventory on an external site. Our only method of getting accurate inventory is running a report under Distribution -> Inventory -> Reports Tab then selecting Inventory Balance and running the report without an Inventory ID so I get a full list of all inventory in our system. How can I run this report (or any report) via Acumatica's API? I can use REST or SOAP in this case.
I need the data from the report in a manner that I can consume it in my C# application and use it to update a database on an external site. So for example, if I were using the REST API, I would want a report returned in JSON format. Example desired return below:
{
"InventoryID": {
"value": "CW-500-MC-30"
},
"Warehouse": {
"value": "WH1"
},
"Description": {
"value": "Milk chocolate chews"
},
"Available": {
"value": 8
}
},
{
"InventoryID": {
"value": "AB-100-SE-30"
},
"Warehouse": {
"value": "WH1"
},
"Description": {
"value": "Face lotion"
},
"Available": {
"value": 12
}
}
As mentioned in the Appendix of the I210 course pdf section Generate a printable invoice by invoice ID :
This web integration scenario is not supported in the available versions of system endpoints. If you need to generate reports, you can use the screen-based SOAP API. For details, see the I200 Screen-Based Web Services training course in Acumatica University.
Looking in that course and following the Example 4.3.3: Generating the Printable Version of an Invoice will show how to get a report through the API.
Which can be resumed by putting the following information in the command list sent through the API.
The different parameters that need to be set for the report
A mention to the PDF Content from the Report Result so that the API knows that must return it to you.
After that you only need to use any library capable of writing to your file system in order to create the PDF file with the information you just received.
I am trying to use the Microsoft Rest API to send emails on behalf of our users. When I create a message as a draft, I get back an ID that I can use in future requests for editing, deleting, viewing the full conversation (after it is sent), etc.
I do not want to save it as a draft since I have no reason to, I just want to send it directly. After it is sent, I would still like to view the full conversation. However, if I just send the email (using the /sendmail endpoint), I do not get that ID. Is there anyway to get it? Here is my request:
POST https://outlook.office.com/api/v2.0/Users/email/sendmail
{
"Message": {
"Subject": "Test",
"Importance": "Normal",
"ToRecipients": [{
"EmailAddress": {
"Address": "<email>",
"Name": "<name>"
}
}],
"Sender": {
"EmailAddress": {
"Address": "<email",
"Name": "<name>"
}
},
"Body": {
"ContentType": "HTML",
"Content": "<html>\\n<head>\\n <style>\\n p { color: red; }\\n </style> \\n</head>\\n<body>\\n <p>Test</p>\\n</body>\\n</html>\\n"
}
},
"SaveToSentItems": "true"
}
The HTTP response code is 202, the email sends, but the body is empty (no content, whatsoever).
I don't think this matters, since I can recreate this in Postman, but I am running this in Nodejs using the node-outlook package.
Emails in Exchange via REST and EWS are submitted for transport, but the actual send and subsequent save to the sent items folder are done async. This is why you don't get the id. Transport is who actually writes the email to the sent items folder, not REST.
If you really need to find the item after it has been saved to the sentItems folder, set something like the PR_SEARCH_KEY and then do a view of the sent items folder and seek to that search key value.
Also note when you save a draft, the id that you get back will be different than the id of the item in the sent items folder because the folder Id is part of the id of the item, so that id wouldn't help you anyways.
I don't know which rest api version are you using (i'm using v2.0) but i will try to explain this issue. Sorry for my english i advance.
You have 2 ways to reply a message: on the fly way or the complete way.
On the fly way
Its the easy way, just send a post request to
https://outlook.office.com/api/v2.0/me/messages/{message_id}/reply
or
https://outlook.office.com/api/v2.0/me/messages/{message_id}/replyall
and with the body
{
"Comment": "This is your message in plain text or html code"
}
and thats all.
The problem with this methos that you can only send plain text or HTML, no attachments or anything else. If that's all you need this is your best option.
The complete way
If you need to send an attachment or perform any other action you need to perform these 3 steps:
1. Create a draft from the message you want to reply
Send a post request to
https://outlook.office.com/api/v2.0/me/messages/{message_id}/createreply
This will give you an json object save the "Id" property {draft_id} of this draft for later use.
2. Update the draft
Send a patch request to
https://outlook.office.com/api/v2.0/me/messages/{draft_id}
and with the body
{
"Body": {
"ContentType": "HTML or Text",
"Content": "Your response in plain text or html"
}
}
or any other parameter you want to change.
3. Send the draft
Send a post request to
https://outlook.office.com/api/v2.0/me/messages/{draft_id}/send
And thats it.
If you need more info abut this check https://msdn.microsoft.com/en-us/office/office365/api/mail-rest-operations
Our application creates a draft envelope from template using docusign rest API. Based on the user input application renaming the document and send envelope for signing.
We are using API PUT "docusignUrl/envelopes/{envelopeId}/documents" to rename the documents of a draft envelope from past 10 months. It was working till yesterday. All of sudden today it is not renaming the document. It is keeping document name as template name itself.
Can somebody please help me to rename the document. I am using demo.docusign.net
Following are the request and response contents.
Url: https://demo.docusign.net/restapi/v2/accounts/1234/envelopes/a499c33a-94c6-46e1-a0f2-bf5cd368529b/documents
Request body:
{"documents":[
{"name":"150821183100_Order-Sign_companyc_P",
"documentId":"1",
"order":"1",
"pages":"1",
"type":"content",
"uri":"/envelopes/a499c33a-94c6-46e1-a0f2-bf5cd368529b/documents/1"
}]
}
Response Body:
{
"envelopeId": "a499c33a-94c6-46e1-a0f2-bf5cd368529b",
"envelopeDocuments": [
{
"documentId": "1",
"name": "SOMA_Sign_OrderManagement.pdf",
"uri": "/envelopes/a499c33a-94c6-46e1-a0f2-bf5cd368529b/documents/1",
"order": "1"
}
]
}
Your previous behavior is the desired behavior.
This is a bug that is being looked into by DocuSign, I'll update this answer if I get any additional information.
UPDATE: The issue has been resolved and is working as intended in Demo once again.
I've been trying to do various things through your Mail REST API today and not having much success... My project (using the api) has been running for at least a month now, but requests to your api are failing.
For example:
GET https://outlook.office365.com/EWS/OData/Me/messages (works)
GET https://outlook.office365.com/EWS/OData/Me/inbox (doesn't work)
Looking at the documentation, still says its available.
Trying to send an email using:
POST https://outlook.office365.com/EWS/OData/Me/Messages?MessageDisposition=SendAndSaveCopy also just returns 400 (Bad Request)
Any info about this?
Also, the http status codes returned are not useful at all; almost all errors return as 400's. In one instance, I didn't provide auth creds, and a 400 was returned instead of the appropriate 401. The accompanying status code detail could also be more helpful.
Thanks for the feedback and sorry for the inconvenience. We are currently deploying some non-backwards compatible changes described here, and this is causing your issues. The current set of changes including versioning support, and deploying non-backwards compatible changes won't cause issues for your app in the future. For the queries, that don't work, please use the following:
Accessing Inbox: https://outlook.office365.com/ews/odata/me/folders/inbox
Send email (new action called SendMail):
POST https://outlook.office365.com/ews/odata/me/sendmail
{
"Message":
{
"Subject": "Test message",
"Body":
{
"Content": "This is test message!"
},
"ToRecipients":
[
{ "EmailAddress": { "Address": "John#contoso.com", "Name": "John Doe" }},
{ "EmailAddress": { "Address": "Jane#fabrikam.com", "Name": "Jane Smith" }}
]
},
"SaveToSentItems": true
}
Hope this helps. We are updating the documentation to reflect the changes, and it should be available shortly. Thanks for the feedback on the HTTP status codes, we will review the status codes returned currently and make any fixes required.
Conversation support is in our roadmap but we don't yet have a timeline to share. Currently, you can search using https://outlook.office365.com/ews/odata/Folders/FolderId/Messages?$filter=ConversationId%20eq%20%%27ConversationID%27 but this will only return messages within the specified folder belonging to that conversation.
Let me know if you have any questions or need more info.
Thanks,
Venkat