Scenario Overview

In this business scenario the end user needed the ability on a yearly basis to generate an Invoice from a Contract.  We decided to set this up so that a user could run a workflow called 'Generate Invoice from Contract' that would,

  • Use the Contract record to create the Invoice record
  • Use the Contract line item records to create the Invoice line items

North52 Decision Suite Solution

The North52 Decision Suite solution works like this,

  • A formula of type 'Process Genie' is created so it can execute as a step within a workflow
  • When it reaches the 'Process Genie' step in the workflow it will execute the formula
  • The formula first creates the Invoice record from the details on the Contract record
  • Next the formula retrieves all the contract line items & creates an invoice line item for each one                                                                                        

North52 Decision Suite Steps

The following set of steps outline how to create this Formula

  • Create a new formula of type 'Process Genie'
  • Set the Source Entity to 'Contract'
  • Copy & paste the formula below into the formula 
  • Click save & test

Workflow Steps

The following set of steps outline how to create this Formula

  • Create a new workflow named 'Generate Invoice From Contract' on the Contract entity
  • Set it to run only 'On Demand'
  • Add a new step to the workflow to call the North52 Process Genie
  • Set the formula shortcode to be the one on the formula you just created, in this case 'lup'
  • Publish the workflow
  • You are now ready to test

Workflow Configuration


Process Genie Configuration



   SetVar('InvoiceId', CreateRecord('invoice', 
                           SetAttribute('name', [contract.title] ),
                           SetAttributeLookup('pricelevelid', 'pricelevel',  FindValue('pricelevel', 
                           SetAttributeCustomer('customerid', 'account', [contract.customerid] , '' )


                             FindRecords('contractdetail', 'contractid', [contract.contractid] , '*'), 

                                                            GetVar('InvoiceId')  ),
                                          SetAttribute('priceperunit', CurrentRecord('rate') ),
                                                       CurrentRecord('initialquantity') ),
                                                            CurrentRecord('productid')  ),
                                          SetAttributeLookup('uomid', 'uom',  CurrentRecord('uomid')  )

                            ) ,

   SmartFlowReturn( 'NoOp'  )


Did you know?

North52 Decision Suite lets you:

North52 Decision Suite enables you to:

  • Author business rules to define automated decisions using industry-leading approaches
  • Measure and maximize decision quality using decision analytics
  • Deploy, progress and optimize decisions that drive your ongoing business operations

Learn more about the North52 Decision Suite