Acumatica - Opportunities Create Quote button - Contract-Based REST API - acumatica

Good day
I have created an endpoint to use the Create Quote action on the Opportunities page. When I sent the POST to the Action I get a 202 response but the Quote is never made. I believe it is because I am only "clicking" the Create New Quote and not the Create button(or Create and Review) on the Dialog box?
Is this a limitation on the REST API? because in the Wiki they do take about the Pop-up Panels with the SOAP connection:
https://help-2020r1.acumatica.com/Help?ScreenId=ShowWiki&pageid=0ff94cd6-a46e-4cf7-8b97-51b79a6b3257

The 202 response only means that the action was accepted and is in progress.
In order to see the actual result you will need to perform a GET on the URL in the Location header of the response
You can find more information about this here :
https://help-2020r1.acumatica.com/Help?ScreenId=ShowWiki&pageid=91bf9106-062a-47a8-be1f-b48517a54324
Check the Response and Status Code sections

Related

DocuSign: listing Document Custom fields → Empty JSON response

When I execute a API GET call to get a list of Document Custom fields on my developers DocuSign account I get a empty JSON response where the status code is showing 200.
And when I'm looking at the documentation on DocuSign itself the response is also empty. Is there a reason for the empty response?
Tabs aren't the same as Document Custom Fields in API terms. Are you sure you're using Document Custom Fields?
If you're trying to pull tabs / form data, that would be a different call, such as GetEnvelope with include=recipients,tabs, ListTabs, or ListRecipients with include=tabs=true
Have you created any Custom fields? DocuSign accounts don't come pre-provisioned with any custom fields. No custom fields = empty response with 200 OK. Here's a blog post from DocuSign which explains how these work. If you have created some but the response is still empty, then this would need to be investigated

Does the DocuSign Intermediate API plan let me use the API to get PDF and form fields?

I tried calling DocuSign sales and support (transferred around 3 times) and no one could give me a straight answer on this. Their "support" actually told be to try stackoverflow, so here I am...
I'm looking at their API pricing levels here: https://www.docusign.com/products-and-pricing/api-plans-b
If I have the Intermediate API, can I make the following API requests?
GET /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}
GET /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/form_data
The part that's throwing me for a loop is the DocuSign Connect feature in the Advanced API plan. The description of it is:
The DocuSign Connect module lets you configure webhooks for envelope events and recipient actions for some or all users in your account. It can also be used to transport the completed documents back to your app or website and to retrieve any form field data entered by your recipients.
I don't need the webhooks, but I need to be able to get the completed documents as PDFs and get the form field data. Do I really need the DocuSign Connect feature for that?
You will be fine with the intermediate plan. Here is the basic distinction between polling and Connect - With Connect, we will proactively notify YOU when key envelope events occur.
Otherwise, it's up to you to call GET /envelopes and/or GET /form_data to retrieve that information. Be wary of the resource limits when you poll.
As a quick aside, instead of making two requests to retrive that information, just make one - GET /envelopes?include=recipients,tabs. This will provide you all the information you seek in one request.
The important excerpt from that guide:
You may not exceed one GET request per unique envelope endpoint per 15
minutes. If you exceed this limit the request will not fail, but it
will be flagged as a violation of rate limits which can cause your app
to fail review to go-live review.
For example, the following transactions violate API rules due to the repeated GET requests to the first document and second recipient:
[12:00:00] POST /accounts/12345/envelopes
[12:01:00] GET /accounts/12345/envelopes/AAA/documents/1
[12:02:00] GET /accounts/12345/envelopes/AAA/recipients/2
[12:03:00] POST /accounts/12345/envelopes
[12:04:00] GET /accounts/12345/envelopes/AAA/documents/1 *
[12:05:00] GET /accounts/12345/envelopes/AAA/recipients/2 *
However, the following set of requests comply with API rules and limits and would not be flagged by the platform:
[12:00:00] POST /accounts/12345/envelopes
[12:01:00] GET /accounts/12345/envelopes/AAA
[12:16:00] GET /accounts/12345/envelopes/AAA
[12:17:00] GET /accounts/12345/envelopes/AAA/documents/1
[12:32:00] GET /accounts/12345/envelopes/AAA/documents/1
[12:40:00] PUT /accounts/12345/envelopes/AAA/recipients/1
[12:41:00] PUT /accounts/12345/envelopes/AAA/recipients/1

Docusign API - How to Activate "Correction" View of Envelope

Hi I am new to Docusign integration to salesforce. I have to change the status of envelope to "Correction" and I have gone through "POST" method provided in the Docusign RestAPI guide.
Doing so, the docusign returns a correction url to activate the correction status. As of now, I am manually pasting that url in the browser to activate correction view.
My question is, how to hit that URL to browser in background through Apex in-order to activate the correction status? (or) Is there anyway to activate correction view of envelope other than hitting URL to browser?
I have tried using HTTP get requests to run that URL . The first request will redirect to another link with status code 302 ("Found"), if i use another request on that using reponse.getHeader('Location') it is redirecting to member login page, (So i have passed another request to login which responded as Status "OK"), if i hit another request on member login page response.getheader('Location') the response of this latest request is "OK"(because i have already logged in using the previous request) and response.getHeader('Location') for this latest request is null and Status of envelope is not changed to "correction".
I know using these many requests is not at all a best practice, could anyone suggest me a perfect way to activate the correction view of envelope? I am in real need of this answer. Please help. Thanks.
The correction view is possible but you have to authenticate your web service request in order to get to it. You can't just find a URL and go to it without authentication - that would violate the security of the transaction.
You can get the correction view URL by doing a POST here
https://{server}/restapi/{apiVersion}/accounts/{accountId}/envelopes/{envelopeId}/views/correct
You would also need to provide these headers:
X-DocuSign-Authentication: <DocuSignCredentials><Username>{name}</Username><Password>{password}</Password><IntegratorKey>{integrator_key}</IntegratorKey></DocuSignCredentials>
Accept: application/json
Content-Type: application/json

In docusign can i request status for a list of envelope ID

I am exploring docusign API.
I am trying to understand if the following is possible with status API
Is it possible to request the status for a set of Envelope Ids. I have seen the documentation for requesting status for ONE envelope id.
Thanks for reading
Yes you can easily request statuses for a set of envelopes through the DocuSign API. I recommend going through the DocuSign Developer Center which introduces tools such as the API Explorer and the API Walkthroughs in the Getting Started section.
Take a look at the 5th (middle) walkthrough here, titled Get Status of Envelopes -
http://iodocs.docusign.com/apiwalkthroughs
The walkthrough shows you the api call in 6 languages (PHP, Java, Javascript, C#, Python, Objective-C) for getting status of a set of envelopes. Using URL params you can filter by status and date.
The API call you need to make is:
Method
GET
URI
/accounts/{accountId}/envelopes
Optional URL params
from_date (url encoded)
status (filter by real-time envelope status)
As mentioned the from_date needs to be URL encoded. For instance, to filter all envelopes that are sent, delivered, or completed since March 1, 2014, you would append the following to the URL:
/envelopes?from_date=3%2F1%2F2014&status=sent,delivered,completed
Yes DocuSign allows retrieving statuses for multiple envelopes.
However, I actually found the above documentation to be inaccurate and missing some info. The HTTP method should be GET and the parameter should be named envelope_ids.
So that would give you an example query of:
GET /accounts/{accountId}/envelopes/status?envelope_ids=abc,def
The response contains the standard DocuSign pagination fields, but they don't seem to be processed if included in the request. There is no mention in the docs as the maximum number of envelopes that can be retrieved at a time.

What structure should I use for an approval workflow?

This is a common problem that I find when programming a Lotus Notes App.
Use case: An employer fills out a request form in a Request database. A notification gets mailed to the person that may give them OK or REJECT for that request. The authority person visits the Request database and gives OK or REJECT.
Good. But, where would you save the approval status OK or REJECT:
Should the authority person have write access to the original request
and set the status directly (and may alter other data in the form)
Should the aproval action create a response doc to the original (and i cannot show in a view the current status)
Typically you are better off setting an approval status directly on the request. That may not seem initially ideal, but remember Lotus Notes isn't like a relational database where things would be more normalized.
Let's consider the alternative, putting a status in the response document. Now how do you show all the requests with their statuses? You'd probably have to write some code just to do that when with the first option you could just create a view.
You can control the access to the document using reader and writer access fields. See how the built in template does it (the approval workflow template). Essentially as the document changes state (i.e. New, Submitted for Approval, Approved or Denied, etc), you can also change the reader and writer access fields at that point.
Once, I designed a database that mailed that request to the approver with the form stored in the document. As long as the user accessed the document using a Notes client, they could click on a button in the message to approve, which would send a message back to the database with the field data to mark the request as approved. An agent in that request database was set to run when new mail arrived, read those messages and change status on the original requests. That way, the approver never had to leave their inbox and didn't even need rights to edit the request.
You could do it with URLs if the users would be approving via browser client - have the link to an agent and pass in the parameters.
Or, to go back to your scenario, once the requester has submitted the request, don't display the fields that you don't want changed, display the values as computed text instead.
Anyway you look at it, best to have the approval recorded on the original document.
For above, Everything is our concern. In SQL or any other RDMS, we are in need of normalize that. Similarly here we have view categorization, show response document in hierarchy, and a lot of great hide when functionality based on role, ACL, unique person and whatever you need. We can easily manipulate the data render depends on the current user.
For your Q:-
1. We can control the appropriate user[authority person] from editing the request form's item.
2. We can also do by the response document. There we can show the documents in view by using show the Response documents in hierarchy.

Resources