Tutorial

This is a step-by-step tutorial to create an order with the MES service. We go from creating a bureau to an order while looking at some of the model printability and material volume estimate features.

Bureau

To create a bureau the following fields need to be passed: name, description (optional), group.

Example request

POST https://erp.authentise.com/bureau/
Content-Type: application/json

{
    "name"          : "Authentise Bureau",
    "description"   : "This is one of the bureaus Authentise supports",
    "group"         : "https://users.authentise.com/groups/00000000-0000-0000-0000-00000000group/"
}
Location: https://erp.authentise.com/bureau/00000000-0000-0000-0000-000000bureau/

This will help create a bureau with name “Authentise Bureau”. We can obtain the URI of the bureau from the Location field in response headers.

Currency Conversion

The currency conversion is a key resource for any bureau that does international business. The conversion plays a vital role in calculating the estimated order cost. To create a /currency-conversion/ resource we will need to supply the bureau, currency and value.

Example request

POST https://erp.authentise.com/currency-conversion/
Content-Type: application/json

{
    'bureau'    : 'https://erp.authentise.com/bureau/00000000-0000-0000-0000-000000bureau/',
    'currency'  : 'USD',
    'value'     : 1,
}
Location: https://erp.authentise.com/currency-conversion/00000000-0000-0000-currency-conversion/

Similarly this bureau might have currency-conversions for other currencies like:

Currency Conversion
Currency Conversion
EUR 0.9353
GBP 0.8038
JPY 109.23
USD 1

Plase NOTE: A bureau-currency relation for a currency-conversion is unique. A bureau will not be able to have two different values for ‘USD’. These conversions are used in translating from your base currency into other currencies. If your materials are priced in USD then your conversion ratio should be 1 and you should set different values for any other currencies to convert from USD into that currency at your preferred exchange rate.

Manufacturer

A manufacturer represents an organization that creates several resources like materials, printers, post-processors, etc. You should use this to keep track of your suppliers, such as Stratasys or 3D Systems. To create a manufacturer you will need to supply a name and address for the manufacturer as well as contact information, both standard and support.

Example request

POST https://erp.authentise.com/manufacturer/
Content-Type: application/json

{
    'name'      : 'Filaments R Us',
    'address'   : '41522 Carol st, San Francisco, CA, 94321, USA',
    'notes'     : '',
    'contact'   : {
        'name'  : 'John Smith',
        'phone' : '123-123-1234',
    },
    'support'   : {
        'name'  : 'Fred Smith',
        'phone' : '123-123-1234',
    },
}
Location: https://erp.authentise.com/manufacturer/00000000-0000-0000-0000-000manufacturer/

This will create a manufacturer with the name “Filaments R Us”. We can obtain the URI of the manufacturer from the Location field in response headers.

Material

Now that we have a manufacturer, we can go ahead and create material. A material resource represents some kind of product that can be used to create digitally manufactured goods. To create material we need: name, description, color, type, retail_price (amount per unit volume in cc), post_processing_seconds, third_party_filfillment, manufacturer.

Example request

POST https://erp.authentise.com/material/
Content-Type: application/json

{
    'name'         : 'ABS',
    'description'  : 'The material is shiny',
    'color'        : '#FFFFFF',
    'cost'         : 0.03,
    'type'         : 'base',
    'post_processing_seconds' : 100,
    'third_party_fulfillment' : True,
    'manufacturer'            : 'https://erp.authentise.com/manufacturer/00000000-0000-0000-0000-000manufacturer/',
}
Location: https://erp.authentise.com/material/00000000-0000-0000-0000-supportmaterial/

The color is specified as a CSS-style RGB color value. The type should be either base or support.

The cost for the material is the amount per unit volume in cc. This amount is a multiplier. When it is multiplied with the currency-conversion for the currency provided for the order, it will give us the exact cost of the material per unit volume in cc. So, if your organization normally internally prices in USD the cost field should be the cost per cc for the material in USD.

Let us create one more material that can be used as a support material when we create orders.

Example request

POST https://erp.authentise.com/material/
Content-Type: application/json

{
    'name'         : 'HIPS',
    'description'  : 'The material is soluble',
    'color'        : '#FAAFFF',
    'type'         : 'support',
    'retail_price' : {
        'currency' : 'USD',
        'amount'   : 0.04,
    },
    'post_processing_seconds' : 100,
    'third_party_fulfillment' : True,
    'manufacturer'            : 'https://erp.authentise.com/manufacturer/00000000-0000-0000-0000-000manufacturer/',
}
Location: https://erp.authentise.com/material/00000000-0000-0000-0000-base00material/

Please NOTE: The retail price amount is the unit amount for that material per cc volume of that material. For the above two materials, assuming we use USD as our business’s currency, ABS base is $0.03 per cc and HIPS support is $0.04 per cc.

Shipping

When servicing orders in MES you may need to ship completed orders to your customers. You can control your shipping methods with the shipping resource. This resource administers the shipping type provided for a bureau in a region. The regions supported as of now are: Asia, Europe and North-america. Every shipping type has a cost associated with it. To create shipping resource we will need: bureau, cost, region, name, description.

Example request

POST https://erp.authentise.com/shipping/
Content-Type: application/json

{
    'bureau'        : 'https://erp.authentise.com/bureau/00000000-0000-0000-0000-000000bureau/',
    'cost'          : 10.25,
    'description'   : 'Flat-rate shipping within Asia',
    'name'          : 'Standard Shipping',
    'region'        : 'asia',
}
Location: https://erp.authentise.com/shipping/00000000-0000-0000-0000-shipping/

The cost of shipping is a term of particular importance. It is basically a unit multiplier that will give you the amount in currency when multiplied with currency-conversion. For the above shipping resource, the calculated total shipping amount for an order using each currency-conversion would be as follows:

Currency Conversion
Currency Conversion Shipping cost(Unit multiplier) Total Shipping cost(Conversion * Shipping cost)
EUR 0.9353 10.25 9.5868
GBP 0.8038 10.25 8.2389
JPY 109.23 10.25 1120
USD 1 10.25 10.25

Templates

There are many ways to produce a final product. In general the process is to first print an object on a printer and then put it through zero or most post-processing steps to refind the part. This process is captured in a template. Bureaus can define many different templates for the different processes they can use to produce final parts

We start to define templates by defining process steps. Those steps are defined by a printer type or a post-processor type. As an example, let’s define a simple template that will print with a Fortus 250 printer and then use a caustic bath on the part.

We first define our printer type

POST https://erp.authentise.com/printer-type/

{
    "build_volume"  : {
        "x"         : 10,
        "y"         : 10,
        "z"         : 12
    },
    "bureau"        : "https://erp.authentise.com/bureau/00000000-0000-0000-0000-000000bureau/",
    "description"   : "",
    "manufacturer"  : "https://erp.authentise.com/manufacturer/00000000-0000-0000-0000-000manufacturer/",
    "materials"     : ["https://erp.authentise.com/material/00000000-0000-0000-0000-supportmaterial/"],
    "name"          : "Fortus 250mc",
    "type"          : "FDM",
}

Location: https://erp.authentise.com/printer-type/00000000-0000-0000-0000-printer-type/

As usual, the response to this request will contain a Location header with the URI of the new resource that was created. In this example we’ve created a new printer type, the Fortus 250mc, which supports printing with only a single material (unlike a real Fortus). We used the material and manufacturer that we created in previous steps of this tutorial. Next we’ll define a caustic bath post-processor

POST https://erp.authentise.com/post-processor-type/

{
    "bureau"        : "https://erp.authentise.com/bureau/00000000-0000-0000-0000-000000bureau/",
    "description"   : "",
    "manufacturer"  : "https://erp.authentise.com/manufacturer/00000000-0000-0000-0000-000manufacturer/",
    "materials"     : ["https://erp.authentise.com/material/00000000-0000-0000-0000-supportmaterial/"],
    "name"          : "SR-30",
    "type"          : "caustic bath",
}

Location: https://erp.authentise.com/post-processor-type/00000000-0000-0000-0000-post-processor/

We now have a URI for our post-processor type, the SR-30 bath. We can now put these two steps into a template for producing a part.

POST https://erp.authentise.com/template/

{
    "bureau"        : "https://erp.authentise.com/bureau/00000000-0000-0000-0000-000000bureau/",
    "name"          : "Fortus 250mc and SR-30 bath",
    "description"   : "Printing with Fortus 250mc and post-process with a bath",
    "process_steps" : [
        "https://erp.authentise.com/printer-type/00000000-0000-0000-0000-printer-type/",
        "https://erp.authentise.com/post-processor-type/00000000-0000-0000-0000-post-processor/"
    ]
}

Location: https://erp.authentise.com/template/00000000-0000-0000-0000-template/

In defining our template the name can be anything that is meaningful to your bureau, as can the description. The only important component is the process_steps you include and the ordering of the process_steps. Here we start with the printer type and then post-process after the printer. If you have multiple post-processing steps (sanding, milling, painting, etc) you will want to be sure to put those in the correct order for the process you want to follow when producing the part.

Order

Now that we’ve set up various aspects of our bureau we have the essential resources ready to create an order to print. Orders are essentially a request to manufacture one or more things. We’ll need a model with contains the CAD data to be manufactured. We’ll have to supply the bureau which determines who will do the manufacturing. We also need to determine the material and support_material used in manufacturing our part.

Because an order can contain multiple objects to be constructed we have to first create a line item for each object before we compose them together as an order.

POST https://erp.authentise.com/line-item/
{
    "bureau"        : "https://erp.authentise.com/bureau/00000000-0000-0000-0000-000000bureau/",
    "model"         : "https://models.authentise.com/model/00000000-0000-0000-0000-000000model/",
    "materials"     : {
        "base"      : "https://erp.authentise.com/material/00000000-0000-0000-0000-supportmaterial/",
        "support"   : null,
    },
    "quantity"      : 3,
    "template"      : "https://erp.authentise.com/template/00000000-0000-0000-0000-template/"
}
Location: https://erp.authentise.com/line-item/00000000-0000-0000-0000-line-item/

Here I’ve defined a single line-item for my order. The request is to print a model, https://models.authentise.com/model/00000000-0000-0000-0000-000000model/, using the material we defined earlier as a base material with no support. I want 3 copies and I want them to be produced using the template we just defined (printed on a Fortus 250, post-processed in a bath). If you need more detailed information on how to upload models you can find it in the 3DIAX Tutorial for more information.

We can now create an order that includes our line-item. We could add many more line-items to a single order, but one is plenty for instructive purposes. The order takes in bureau, currency used to process the order, name of the order, shipping details, customer email, due date for the order, field for additional notes related to the order.

There are few additional fields which are optional that an order supports: An order type which can be one of the choices: standard, benchmark or timestudy; Sales representative name; Channel representative name; region which can be one of the choices: north, south, east, west; and sales status which can be one of the choices: won, lost, outsourced, dead, pending.

POST https://erp.authentise.com/order/
Content-Type: application/json

{
    "bureau"        : "https://erp.authentise.com/bureau/00000000-0000-0000-0000-000000bureau/",
    "currency"      : "USD",
    "customer_email": "customer@authentise.com",
    "due_date"      : "2017-08-15T06:04:01.207454+00:00",
    "line_items"    : ["https://erp.authentise.com/line-item/00000000-0000-0000-0000-line-item/"],
    "name"          : "My tutorial order",
    "notes"         : "This order has delicate parts.",
    "shipping"      : {
        "address"   : "8676 S 1300 E Sandy UT, 84094, UT, USA",
        "name"      : "Eli Ribble",
        "uri"       : "https://erp.authentise.com/shipping/00000000-0000-0000-0000-shipping/"
    },
    "sales_representative_name"     : "John Smith",
    "channel_representative_name"   : "Will Smith",
    "region"        : "north",
    "sales_status"  : "won",
    "order_type"    : "standard",

}
Location: https://erp.authentise.com/order/00000000-0000-0000-0000-000000order/

This sends a request to our bureau, https://erp.authentise.com/bureau/00000000-0000-0000-0000-000000bureau/ to build 3 copies of my model (as defined in my line-item). I’ve also requested that the order be shipped to my office with my name on the box using the ‘standard shipping’ we defined earlier.

We specify the order’s currency to get cost estimates in my own currency.

Later I can do a GET request to find out the status of my order

GET https://erp.authentise.com/order/00000000-0000-0000-0000-000000order/
Content-Type: application/json

{
    'bureau'    : 'https://erp.authentise.com/bureau/00000000-0000-0000-0000-000000bureau/',
    'created'   : "2016-11-02T18:47:58.176307",
    'currency'  : 'USD',
    "customer_email" : "customer@authentise.com",
    "due_date"  : "2017-08-15T06:04:01.207454+00:00",
    'status'    : 'calculating_estimates',
    'error'     : None,
    'estimates' : {
        'print_time'    : None,
        'cost'          : {
            'amount'    : None,
            'shipping_amount'   : None,
        },
        'materials': {
            'support'   : None,
            'base'      : None
        }
    },
    "line_items": ["https://erp.authentise.com/line-item/00000000-0000-0000-0000-line-item/"],
    'name'      : 'Authentise Order',
    "notes"     : "This order has delicate parts.",
    'shipping'  : {
        "address"   : "8676 S 1300 E Sandy UT, 84094, UT, USA",
        'name'      : "Eli Ribble,
        'tracking'  : null,
        'uri'       : null,
    },
    "sales_representative_name"     : "John Smith",
    "channel_representative_name"   : "Will Smith",
    "region"        : "north",
    "sales_status"  : "won",
    "order_type"    : "standard",
    'uri'           : "https://erp.authentise.com/order/00000000-0000-0000-0000-000000order/",
}

The status field of an order defines the status of the order. As of now we have 10 different statuses that an order can have. They are as follows:

Order Status
Status What does is mean?
new When the order is created
calculating_estimates When the order estimates are being calculated
pending When the estimates are calculated successfully. The order is waiting for a user to confirm the order.
confirmed When the user confirms the order after the estimates come back indicating the order should proceed
processing When the prints for the order are being processed
complete When the order is complete and delivered
cancelled When the order is cancelled by the user
error When the order goes into an error state

As time goes on the order should progress through the various status steps through to complete. If the order enters an error state it will prevent the order from moving forward until a user deals with the error and resolves it. When the status of an order is error the error field on the order will provide additional details about the error to help users resolve the situation.

Estimates for an order

Once an order resource is created and passes the model printability tests the system calculates estimates for the order. At this point the order updates its status to calculating_estimate.

Estimates are calculated using various processes but generally done by slicing the model using a slicing engine and using previous similar models and prints as a guide.

Estimates usually only take a few minutes after an order is submitted to calculate. We can view the estimates if we do a GET on /order/ resource. We will also see that the status of the order is updated to pending from calculating_estimates.

GET https://erp.authentise.com/order/00000000-0000-0000-0000-000000order/
Content-Type: application/json

{
    'error'     : None,
    'estimates' : {
        'print_time'    : 123,
        'cost'          : {
            'amount'            : 6.2454,
            'shipping_amount'   : 10.25,
        },
        'materials': {
            'support'   : 1.5731616,
            'base'      : 50.8655584
        }
    },
    'status'    : 'pending',
    ...
}

The order resource has a field estimates. This field contains the support material and base material volume estimates(in cc) for all of the prints of all of the line-items on the order. We can also see estimates on individual line-items by making a GET request on the line-item. For cost estimates the currency used is the currency specified on the order. The amount is calculated by taking the retail cost per unit cc as specified in the material resource.

Because this order requested shipping we also provide estimates for the cost of shipping. Currently the system only supports flat-rate shipping, so the shipping estimate is simply the cost specified for the shipping type the user requested

Conclusion

In this tutorial we’ve shown an overview of some of the features involved in creating and processing orders with MES. There are several more advanced features we did not touch on, such as the ability to gather together prints from different orders into runs, automatically tracking run status through Echo or using MES to schedule jobs in queues for printers in different locations.

You can find full details on how to use the MES module in Reference