Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Navigate to Setup

  2. Expand the section Process Automation

  3. Click the link Process Builder

  4. Click the button New

  5. Enter the Name for your new Process

  6. Select that the process starts when A Platform Event Message is received

    Image RemovedImage Added

  7. In your newly created process, click Add Trigger

  8. Search for the Platform Event “OptimizerVersionActivationCompleteEvent

  9. Select the object “Optimizing Version

  10. Setup the following matching conditions

  11. Press Save

  12. You can add further criteria for when the process should run, as a default however you can select No criteria—just execute the actions! and give condition a name

  13. Now select an Action. In order to trigger the pre-invoice generation select Apex  ADvendio__GenerateInvoiceController. Set the Apex variables as follows

  14. Your process should look as follows (including any other additional criteria you may have added)


...

  1. Navigate to Setup

  2. Expand the section Process Automation

  3. Click the link Flows

  4. Click the button New Flow

  5. Select the ADvendio Optimizer OptimizerVersionActivationCompleteFlow template

    1. The Flow template comes with a pre-created Apex Action that will generate the PreInvoices for a given Media Campaign.

  6. Create a new Flow adding any custom logic you wish to trigger based on the Platform Event “OptimizerVersionActivationCompleteEvent

    In order to invoke the Flow from the process, go back to the process and delete the Apex Action you created earlier

  7. Create a new Flows Action which will invoke the Flow you just created

    1. If your Process was already activated, you may need to clone it before you can make these changes

  8. You will also need to pass the Media Campaign ID to the Flow, as you can see below

    Image RemovedImage Added

  9. Activate your new process

...