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 “OptimizerVersionActivationCompleteEventProcessCompleteEvent

  9. Select the object “Optimizing Version

  10. Setup the following matching conditions

    Image RemovedImage Added

  11. Press SaveYou 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

  12. click Add Criteria

  13. Give your Criteria a name, (for example OptimizerVersionActivation), and select Criteria for Executing Actions: Conditions are met

  14. Setup the following conditions
    Value: OptimizerVersionActivation

    Image Added

  15. Press Save

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

    Image Removed

    Value: ADvendio__OptimizingVersion__c].ADvendio__MediaCampaign__r.Id

    Image Added

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

    Image Removed

Optional: Creating a Flow

If you want to take advantage of the high customizability of Salesforce Flows, you can also use our Flow template to begin your custom Flow creation.

...

Navigate to Setup

...

Expand the section Process Automation

...

Click the link Flows

...

Click the button New Flow

...

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.

...

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

...

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

...

...

Activate your new process

...

  1. Image Added