CPM Invoice Automation Routines

CPM includes two automation routines for the processing of retrieved invoices. 


You can view these (and all other automation routines) by choosing the looking glass within Business Central, entering CSM Automation List, and then choosing the related link.


To support these automation routines, a CPM Invoice Status field is present on the CSM Automation List page. In this field you can specify the CPM invoice status to which the automation routine applies. In this way, you can define automation routines for only those invoice status values that you want to automatically process.


The two automation routines that exist for CPM invoice processing are:

  • UPDATEINVOICE: instructs CPM to review and update any CPM invoices that share the value in the CPM Invoice Status field. For example, if we assigned a CPM invoice status value of No Action to the automation and then executed it, CPM would retrieve the latest data for all CPM invoices with a No Action status. This in turn could 
    prompt an update to the CPM invoice’s status.
  • EXECUTEINVNEXTACTION: instructs CPM to execute the action specified in the CPM Invoice Status field. For example, if we assigned a CPM invoice status value of To Be Built to the automation and then executed it, CPM would build a new Business Central sales invoice for any CPM invoices with the To Be Built status.


This automation currently supports the following CPM invoice status values:

  • To Be Built
  • To Be Posted
  • To Be Cancelled

As with the invoice status matrix, CPM includes a number of out-of-the-box automation routines for CPM invoicing, but you can add more automation routines to meet your company’s specific needs. When creating and scheduling these automation routines, it is important to pay attention to their assigned sequence so that the proper automation is 
executed first. Using our example above, we want to run the UPDATEINVOICE for all of our No Action invoices before running the EXECUTEINVNEXTACTION for all To Be Built invoices; doing so ensures that any No Action invoices can have their status updated to To Be Built, and will in turn be included as part of the subsequent automation.