Administrate

Building an Ordering System With the Administrate API

The purpose of this guide is to describe how you can effectively integrate Administrate into a new or pre-existing online ordering system by utilising the Administrate API. With Administrate Sales Opportunities system you can build a workflow to capture sales at any stage within your pipeline, from the initial capture of the lead straight through to the closing of the sale and the collection of payment.

By connecting your online ordering system to Administrate you gain all the benefits of tracking sales through your pipeline within the Administrate Sales Opportunity system and create an ordering process that fits your business and your customers.

This includes:

  • Capturing customer data within the Administrate CRM.
  • The ability to record pending sale details and their value.
  • Generation of quotes that can then be emailed to customers.
  • The automatic creation of registrations and invoices when a sale has been closed.

This guide will demonstrate a number of ways in which you might choose to hook up your ordering system into the Administrate API:

Example Workflows

Below are two example workflows of some common e-commerce sites. The building blocks and actions below will show you how to put these together.

A fully online process taking payment

Many training providers want to be able to offer an end-to-end purchasing process that includes registering students directly onto an Event and taking payment with a secure payment provider.

This process would entail building a shopping cart for training and related items you offer for sale. This shopping cart is modelled as an Opportunity, and the items in the cart would be recorded as Interests on the Opportunity. You would want to collect your prospect’s information: the purchasing organisation (stored as an Account); at least one contact at the organisation (a Contact); and you may also choose to include contact information of Students they intend to register (Contacts linked to Interests).

By configuring the Steps in the Opportunity system with Triggers that fire when making a Transition from one Step to another, you can automatically create Registrations for the Students, and an Invoice for the purchase. This can be configured within the application so that all that is needed from the API is to update the step on the opportunity to trigger the Transition. Payment can be passed off to a third party payment processing engine such as PayPal or Stripe. Once a payment confirmation is returned by them, the payment can be recorded in Administrate against the Invoice. Finally, you can generate a confirmation email for the customer which includes a receipt and registration details.

The process would look something like this. You’ll notice the building blocks and actions needed at each step, which are outlined in more detail below.

Sample workflow for online store with payment

Sample workflow for online store with payment

An online quote process with sales follow-up

Some training providers have larger deal values that aren’t typically paid or even invoiced immediately. In this case, the same process as above could be used: create an Opportunity and collect the prospect’s information. Instead of proceeding directly to an Invoice and payment, you can have the system generate a Quote, and provide that to your prospect. The Opportunity will be logged for follow-up with your sales team.

Sample workflow for online store generating quotes

Sample workflow for online store generating quotes

The Building Blocks

There are a number of elements and actions that you will combine to build various workflows like those above depending on the structure of your sales process, and your requirements.

Opportunity - ‘The Prospective Sale’

Opportunities are how you will represent a potential sale within Administrate. In the case of a typical e-commerce site, this would capture the user and their details, as well as the shopping cart of items they are looking to purchase. This Opportunity will be updated with further information, such as qualification details. All of the information can eventually be used to produce an Event Registration and Invoice at the very end of the sales process.

Please also see our documentation on the Opportunities through the UI.

Accounts and Contacts - ‘The Customer’

An Account represents an individual or organiaation to which you are selling to. A Contact is a person within the organization. You will want to capture the Contact details of the person handling the purchase, and you may also want to capture information on the students to be registered.

Please also see our documentation on Accounts and Contacts in the UI.

Interests - ‘What does the customer want to buy’

Interests represent the various things that the customer wishes to buy. These can be courses, events (private or public), or any other items that you sell. These also include the price for which you are selling these items.

Please also see our documentation on Interests used in the UI.

Actions

Create an Opportunity

The first thing you will want to do in most workflows is to create an Opportunity. The opportunity is a complex structure, which has many relations. Most notably, you will be concerned with its Interests, representing what is being purchased. Optionally, you can attach Account or Contact information at this stage, as detailed below. You may also want to include Quotes as detailed in the second example workflow. If you intend for the system to automatically generate a Registration and an Invoice from the Opportunity, be sure to set up the Steps, Transitions and Triggers in the application. Refer to the Administrate opportunity workflow documentation for more details.

Create Account

If the customer is not already in your Administrate CRM, you may want to add them using the Accounts endpoint, and attach it to the Opportunity as an update. You do not need an Account to create the opportunity, but you will need it in order to create a Registration or Invoice from it. You must create an Account before you create the Contacts for it.

Create Contact

In addition to the Account, you may also choose to create a Contact using the Contacts endpoint with information like name, email and phone number. This Contact would be attached to the Account. Note that all Contacts must belong to an Account, so you’ll need to create the Account first. In addition to the Primary Contact on the Opportunity you can also associate places in an Event Interest with a Contact, such that the Registration will include the student names. These can be created the same way and updated in the Interest items of the Opportunity.

Create Registration

The standard way to create a Registration is to progress the Opportunity from one step to another, eventually getting it to trigger a Transition that is configured to create a Registration. Be sure this is set up with the system administrator first, and refer to the Administrate opportunity workflow documentation for more details.

Generate a Quote

If you intend to generate a Quote for the customer, rather than an invoice or payment from a payment processor, please follow the documentation for Generating a quote for an opportunity. This will take all the Interest items on the Opportunity at that point in time and freeze them into a Quote, with a total value of the Interests.

Create Invoice

Like with Registrations (as above). the Invoice can also be created as a Trigger on a Transition. If this is configured in the application, all that is needed as an update to the opportunity step to cause the invoice to be created. Another way to create an Invoice is to use the Registration’s details with the Create from Registration call. Note you can retrieve the PDF version of an existing invoice to provide to a customer using the Invoices by Account endpoint.

Record a payment

After taking payment from the customer, you can record the payment against an invoice by using the Create a Payment for an Invoice function. Payment receipts can be retrieved as shown in Payment Receipts endpoint and provided to the customer.

Generate a Document

Administrate can create templated documents for use in the sales process as either the body of an email, or as a static document to attach to the opportunity and provide to the customer. For details on configuring Document Templates, please see our Documentation Templates documentation. To generate one of these documents for your Opportunity, see Adding a document to an opportunity. If you also wish to email this to the customer, proceed to the section below.

Email the customer

At the end of the purchase, you may want to send a confirmation email to your customer. You can generate your own body, or use a Document Template (as above) for automated content. You can attach generated documents that are linked to the Opportunity, or Quote Documentations, along with the body of the email. To learn how to do this, refer to the documentation on Sending an email for an opportunity.