Empower Help

Search:

Display Legacy Contents

IndexBookmarkPrint

Home > Factory Productivity and Scheduling > Advanced Topics > Import Export Data > Empower API > Using The API To Post Data > Products and Processes

Products and Processes


Products  can be created or modified through the API using the function calls


1. CreateNewProduct(ProductData as NewProductData)


This function takes a single argument of data type NewProductData and returns the ProductId if created with a success message.


If there is an error it returns a ProductId of 0.

 
2.  To create or modify a Product 


CreateOrModifyProduct(ProductData As NewProductData)

If the Product is not available, it will create a new Product with the details.




The following data types and whether they are mandatory or not are used

NewProductData

ProductName As String (mandatory)

ProductCode As String (non mandatory)

Status As String (should be "Current")

ProductGroup As String (mandatory)

ProductDescription As String (Non Mandatory)

AutoSequence As String (Non Mandatory)

ProcessList As List(Of ProductProcess) (Non Mandatory)

 

ProductProcess

ProcessName As String (Mandatory)

ProcessData As NewProcessData (Non Mandatory)

BudgetTime As String (NonMandatory)

 

NewProcessData

ProcessName As String (Mandatory)

ProcessDescription As String (Non Mandatory)

ProcessGroupName As String (Mandatory)

 

NewProductData Takes the details of the Product, whereas  ProductProcess takes the details of processes and budgeted times.


As a result the request body should be based on the following


<soapenv:Body>

      <web:CreateNewProduct>

         <web:ProductData>

            <web:ProductName>PRODUCT NAME</web:ProductName>

            <web:ProductCode>PRODUCT CODE</web:ProductCode>

            <web:Status>Current/Non Current</web:Status>

            <web:ProductGroup>PRODUCT GROUP NAME</web:ProductGroup>

            <web:ProductDescription>PRODUCT GROUP DESCRIPTION</web:ProductDescription>

            <web:AutoSequence>True/False</web:AutoSequence>

    <web:ProcessList>

              <!--Zero or more repetitions:-->

               <web:ProductProcess>

                 <web:ProcessName>PROCESS NAME</web:ProcessName>

                  <web:ProcessData>

                     <web:ProcessName>PROCESS NAME</web:ProcessName>

                     <web:ProcessDescription>PROCESS DESCRIPTION</web:ProcessDescription>

                     <web:ProcessGroupName>PROCESS GROUP NAME</web:ProcessGroupName>

                  </web:ProcessData>

                  <web:BudgetTime>BUDGET TIME</web:BudgetTime>

               </web:ProductProcess>

            </web:ProcessList>

         </web:ProductData>

      </web:CreateNewProduct>

   </soapenv:Body>


The following example for a Product called chair may aid in understanding:


<soapenv:Body>

      <web:CreateNewProduct>

         <web:ProductData>

            <web:ProductName>Chair</web:ProductName>

            <web:ProductCode>Chair Type 1</web:ProductCode>

            <web:Status>Current</web:Status>

            <web:ProductGroup>Factory</web:ProductGroup>

            <web:ProductDescription>This chair has four legs<web:ProductDescription>

            <web:AutoSequence>True</web:AutoSequence>

    <web:ProcessList>

              <!--Zero or more repetitions:-->

               <web:ProductProcess>

                 <web:ProcessName>Make Legs</web:ProcessName>

                  <web:ProcessData>

                     <web:ProcessName>Make Legs</web:ProcessName>

                     <web:ProcessDescription>This involves making the legs for the chair</web:ProcessDescription>

                     <web:ProcessGroupName>Factory</web:ProcessGroupName>

                  </web:ProcessData>

                  <web:BudgetTime>5</web:BudgetTime>

               </web:ProductProcess>

            </web:ProcessList>

         </web:ProductData>

      </web:CreateNewProduct>

   </soapenv:Body>






For more information see
Example Code
WDSL Schema



 

See also
Setting Up Products
Setting Up Processes

 



 



See also