SpringCM REST API | Developer Deep Dive


[MUSIC PLAYING] Hi, my name is Matthew Roknich. I am the Developer
Evangelist here at DocuSign. I’m here today in Chicago with
Keith Litwin, who is a Senior Director of Engineering. Keith, thank you so
much for being here. Thanks for having me, Matt. So Keith, how did you get your
start in software engineering? Well, I’ve been in technology
for a little over 20 years. I started out during the
.com boom selling computer equipment. Really loved it. Went back to school to
learn software engineering. Since then I’ve worked in big
companies, like Oracle and IBM, as well as smaller startups. And then I came to SpringCM. Been here for a little
over nine years. I started out as our Lead
Solution Engineer building custom solutions. Worked my way up to
VP of Engineering, which was my role at
the time that DocuSign acquired SpringCM. Very cool. So what are you
currently working on? What’s your focus? Kind of two main focuses. So we’re building
out some new products that are leveraging the SpringCM
platform, as well as we’re continuing to build out our
contract lifecycle management solution, which is
part of DocuSign’s overall system of agreement. So contract lifecycle
management– what exactly is that? Well, that generally
refers to a secure platform that allows you to generate
documents, route them for approvals, and manage
negotiation and redlining. Really it helps you automate
any document-centric business process. Now, within the context of
DocuSign system of agreement, SpringCM fits perfectly into
what we call the prepare stage. Where we’re enabling customers
to create and collaborate with one another prior to
sending out the agreement. So it sounds like
SpringCM brings a tremendous amount of
value to our customers, but what about developers? I was very excited to hear
that SpringCM has a REST API. What specific functionality
is accessible to our devs? So the API allows developers to
work with SpringCM’s documents, data, and services. And pretty much almost
anything that you can do inside SpringCM user
interface is exposing the API. The way to think about it is
that the API is broken down to kind of 3 logical sub-APIs. There’s the object API, which
is your standard create, read, update, delete operations. Examples there might be I
need to create a folder, delete a folder, create
a user, create a group, put user in a group–
those kinds of things. There’s the Task
API, which you can think of as being like
asynchronous background tests, or I want to give
SpringCM a piece of work to do on my behalf. And examples there might
be generate a document, run a search for me, zip a
bunch of files for download, and that kind of thing. And then there’s
the Content API, which is working with the
documents themselves, which would be like upload, download,
and versioning of the document. Excellent. I suspect a good
number of our viewers are relatively
unfamiliar with CRM. Do you have a demo
you could show us? I do. And what I’m going
to talk about today is one of our most
common use cases, which is contract lifecycle
management within Salesforce. And so to set the
stage for that, we’re going to use
an example scenario where we have a
sales rep, Ernesto, who needs to close a deal. And he needs to
generate a sales order, and part of sending
that out will have to go through an approval
from his manager, who’s Keith– I’ll play that role– and then Kathy, who is our
customer that will ultimately have to sign it with DocuSign
electronic signature. So what we’re going to show
is dynamically generation of a document based
on Salesforce data, we’ll show how the routing
and approvals work, and then we’ll ultimately
see our sales order go out for electronic signature. OK. So here we are inside
Salesforce on an opportunity that we’re going to
use for our demo. In this case, like
we talked about, here’s our opportunity,
Ernesto, and he’s our sales rep that’s going
to generate a sales order. We’re here in the
contract legal space ready to send this
out for review. So I’m going to go ahead and
click generate sales order. And that’s going to
take us into a new tab into the SpringCM document
generation wizard. And what you can see
here is that it actually dynamically pulled data
from Salesforce in here, and you can see the adjust
information is pre-populated, the primary quote information
is pre-populated, as well as the quote lines. And then we can do some
interesting things in here. Like if we wanted to attach
some additional documents with our sales order or
we can come down here, and let’s say we want to switch
our payment terms from net 30 to net 45. Now when I switched that,
notice what happens here. We have a rule that
was set up that said modification of payment terms
require management approval. So this is great for
our demo for our phase 2 when we want to send this
to a manager for approval. And then I’m going to
go ahead and click Next. And so this is building
our document preview. It’s taking that structured
data that we just pulled here into the wizard. It’s taking a Word
template document that we pre-created
and now it’s showing us a preview of what our document
is going to look like. We can see our order form. Here, has the data
pulled in from Salesforce nicely formatted that it’s
ready to go out to our customer. Now, I’m going to pause over
here and pull up some code. So let’s say, for example,
we’re not using Salesforce. We have some other
third party system. It might even be
some homegrown system that you have and you want
to do document generation leverage a wizard
like we see here, you can do things like as
simple as creating a template and choosing which
one you’d like to use. Creating some structured data. In this case, we might have
queried a database or something along those lines. And then doing a
simple post to the API. Say here’s the data,
here’s the template I want, and it gives me back a URL to
go ahead and launch the wizard. And there’s even the
sub-services underneath that. Let’s say I just wanted
to generate the document– I could give it the
structure, data and template, and just say, we
don’t need the wizard, just generate the
document, and off it goes. So next I’m going
to come in here and I’m going to go ahead
and save the document. And that’s going to take us back
into our Salesforce opportunity and what we’re going to see,
when I scroll down here, that our document
has now come in and is associated
with our opportunity, inside a SpringCM folder
that’s associated with it. And I’m going to take a look
at the generated document. And there’s lots of
interesting things that we see. So the first thing that we
see is the current stage. So the document was
generated, and now it’s gone straight into Manager
Approval, because we saw that earlier, that that’s
what was required for net 45. I’ve come over here,
now, to Attributes– so the document was tagged
with the data from Salesforce, so inside SpringCM we
could use this data to do queries and searches,
reporting, that kind of thing. And then there’s
all kinds of actions we can take on the document. So we could upload
a new version, and we can send for
external review, we could share it with
somebody, we can maybe look at the history, and
other pieces around what we’ve done here. But for our demo,
let’s assume that we want to build, let’s say,
a mobile application that’s leveraging this document,
and do something interesting with
the API, or maybe surface this in a portal or
some third party application. So let’s take a look at what the
document looks like in the API. So what I’m going
to do is, I’m going to grab this document’s
unique identifier right here off the query string. And I’ve set up a
test harness where we can query the
API in real time and see what this
document looks like. So I’m going to go ahead in
here and populate this field with our document
ID, and I’m going to go ahead and query for it. And what we can see back– as
we get back our document object, our API representation
of our document object– are sales order, description
was agreement and review, like we saw. And then we can start to
see these child objects that are associated with it. For example, here’s our parent
folder that the document is in, you can see it’s not expanded,
but it gives us an endpoint. If we’re interested
in the parent folder, we can do a query on it. So I have that set up
already for us over here, and I’m going to go
ahead in and query. Now what’s interesting
is, I look at the– with some standard
things like a name, created data, update to date– I’ve also see our child
set of documents here. So like we saw, our
new generated document. And then, what’s interesting
is this object called EOS Info. And notice that it has the
object ID from Salesforce, and the object type of
Salesforce opportunity. And what’s interesting when
I asked for the document, up here on the query
string– excuse me, asked for the folder– I have Salesforce
opportunity and EOS Object ID, which is the
Salesforce Object ID, and then set expand
equal documents. So here, right in
the query string, I’m actually querying
by the third party system, Salesforce’s object ID. So when the folder was
created, we tagged it, and that way, if–
let’s say you’re building your own application
that needs storage, you can use data from
the third party system and not have to manage
like, SpringCM, Object IDs, and things like that yourself. So let’s go back to
our document object and look at that a
little bit further. And as we scroll down, we
can see some of the objects, like attribute
groups, are expanded, and that’s because on the
query string here I said, you know what? When you give me
this document, I don’t want to make callbacks
like I just did for the folder, just give me all the attribute
groups in this other object document process
tracking activities right on the first call. And so here you can see,
just like we saw in the UI, we can see things like
our quote number, who prepared the document, the
quote expiration and things like that, and that could be
used in our custom mobile app to show the end user. And as I scroll down, you
can see all the other kinds of things, like security
around the document, how to version
it, whether or not I want to share the
document, that kind of thing. And then we get to our document
process tracking activity. And this is an interesting
object in that it’s actually showing us the approval. So for our end user, we can
say it’s assigned to Keith, it’s in status for its
status waiting, waiting for the manager to approve it,
and then what potential user actions are. Now in a normal CLM use
case, we wouldn’t necessarily come into the document first. We would– because the
manager’s not navigating to the opportunity and looking
for things for him to do– we just want that to
sign directly to him. So in a normal
use case, he would have something like this, like
the SpringCM Inbox Tracker. And inside here, when I
refresh, it says OK, well it’s mainly for management approval,
so these are the tasks that are assigned to me. And if I were to
click review here, it takes a slightly different
view of the document. It takes us straight
into the approval flow. And now, remember
our three phases, where we said first we’re going
to generate the document– so we’ve gone through that,
we saw what the document looks like– now we’re in the
second phase, where we have to do a manager approval. OK, so let’s dig a
little bit deeper and to see what that looks like,
in both the UI and the API, if we’re building
our mobile app. So inside here, you can see that
this particular approval just is a simple one, it just
says approve or reject, and allows you to do
some simple comments. In this case the workflow
is set up to say approve, it will go out for Docusign
electronic signature. In the case where
we rejected, it might be sent back to
Ernesto, our sales rep, to go ahead and
make some changes. We can give him some comments
and things like that. OK so let’s come back over
here to our test harness and see what we can do here. So I have another query set
up, and this is basically the equivalent of what
we just saw in the inbox. So give me all the
tasks that are assigned to Keith, and in the
API, that’s actually considered a work item
or a piece of work that an end user has to do. So here you can see I have
queried for user/ –and this long GUI is actually my user
ID, so I had that pre-set up, and then /workitem to say,
give me the actual inbox or the collection of work items
that are assigned to Keith. And so here we can
split our users, and here’s all of
the tasks that you have to do, and allow them
to potentially take action. So if we want them
to take action– I’m going to go ahead now and
grab the unique identifier for our current work
item right here, and I’m going to set
that in our variable so that we can make
some queries against it. So I’m going to go ahead
and do that right here. And let’s make sure that we have
the right object, and go ahead and query directly
for that work item. Now when I query directly
for the work item, notice I get a little
bit extra information. I get this selections
right here, and it gives me the options of
what the end user can actually do, they can either
approve or reject. In the case where we do
something more complex, you’ll have other
options there, we might prompt the user
to choose another user to do the additional approvals,
or maybe extra documents, and things like that. But our case, we’re going
to do a simple approval. And let’s say we want to
approve this with comment, I have a patch set up here. And our payload
will look like this. So now we’ve chosen selected,
the item was approved, right? Some of approvals might have
multiple options, in our case, it’s simple approval. And then our comment,
this is a great demo, we’re going to post that back
to the work item end point, clicks send. So we got back 200, and let’s
go back to our Salesforce UI, and reopen up the document
and see what happened. So now we immediately see that
the status of the document is changed. So we see the
manager approval, you have approved, it’s gone
out for electronic signature to Kayla174, which is our test
user, which would normally be Cathy Customer, which is
CH3, that we talked about. So now we’ve done the
document generation, we’ve done our approval,
and now the final phase is out for signature. So let’s look a little
bit closer at that. If I come back over
here to our document and just query for
it again, we can see now our document
process tracking activity says send for signature. And it can tell that
it’s in a waiting status, that string states I’m
waiting for it to be signed, for it to come back in. We can see that it was
signed to [email protected], and if we come back over
here to actually the inbox, we can see that the signature
request was sent out by Ernesto, and said to go
ahead and review the data. OK, so– our first phase,
second phase, and third phase will now be complete
once it signed. Now I’ve been talking
a lot about workflow. And that’s an important
piece of the story here, in terms of– we have
the UI and the API that’s interacting with these work
items, and what we’ve done is pre-created a workflow
here that kind of models the business process. And we’ve been mostly talking
about the prepare phase– created the document, now
kicked off this workflow. We can see that some decisions
were made about the document. Comes through to
approver one, where we saw that we programmatically
execute on that in the API. And once that was completed,
then it came in here to the signing phase,
and once they signed, then there’ll be some downstream
activities with their act and manage, once the document
comes back from signature. So Keith, what’s the best
way for developers to get started with Spring? So I encourage anybody who’s
interested in the SpringCM API to first check out
developer.springCM.com. There we have all
kinds of information about what you can do with
the API, a lot of things that I didn’t show in this one. And then when they’re
ready to start coding, to reach out to their
SpringCM representative. Awesome. And are there any jobs available
for engineers in Chicago? Oh yeah, we’re hiring across
our entire technology team. We’re looking for full stack
engineers, UI engineers, QA, operations. So I encourage anybody who’d
like to join us to check out the Docusign job site. Great. Thanks for chatting. Hey, appreciate it. [MUSIC PLAYING]

Leave a Reply

Your email address will not be published. Required fields are marked *