Integrations and APIs for Service

Get Involved. Join the Conversation.


    Senthil Krish
    calling cp model (custome script) code from CPM
    Topic posted June 13, 2016 by Senthil KrishRed Ribbon: 250+ Points, last edited June 13, 2016, tagged Custom Process Models - CPMs 
    204 Views, 1 Comment
    calling cp model (custome script) code from CPM


    Can I call a method in my model class written in customer portal (or custom scripts) from CPM script (as shown in the code block)?

    Thanks in advance. 

    Senthil K



    service cloud Feb-2016
    Code Snippet:



    • Scott Harwell

      You can use PHP's include and require statements to import code from custom scripts and/or customer portal.  However, Customer Portal models expect the CP framework in order to work, so unless you're calling a static method, you won't be able to leverage much.  You can, on the other hand, leverage custom classes or libraries that you've created in custom scripts that use Connect for PHP APIs (or standard PHP functionality).