`
Mobile Accelerator for Oracle Service Cloud — November 2016
Top of Topic

Create and deploy the event handler

You create and deploy an event handler for push notifications in Oracle Service Cloud.

Before you begin

You must import the gcm_incident.php file that you downloaded and extracted from the imports.zip file.

About this task

The gcm_incident.php file must have a valid incident ID in the following line for testing, for example:

$inc = RNCPHP\Incident::fetch(37);

Procedure

  1. In Oracle Service Cloud, click the Configuration button on the navigation pane.

  2. Under Site Configuration, double-click Process Designer.

    The Process Designer opens.

  3. Click New on the ribbon.

  4. Select the Execute Asynchronously check box.

  5. Click the folder button next to the PHP Code File field, browse for the gcm_incident.php file in the imports/cpm_scripts/Android_push_notification folder, and then click Open.

    The PHP code is loaded into the PHP Content field as read-only text, and the Procedure Name field is completed with gcm_incident.

  6. Click Save.

    You must save the event handler to test it.

  7. Click Test under State.

    If push notifications have been configured correctly, the Test Result window displays: start pushing notification ...GOOGLE_API_KEY:, and so on, and a push notification is sent to the mobile device.

  8. Click OK.

  9. Click Yes in the Event Handler window.

  10. Click Save, then click Deploy to deploy the event handler.

  11. In the Deploy window, type the email addresses to which you want to send notifications in the Email Address field (separated by commas), and then click Deploy.

    A Deploy message displays.

  12. Click Yes to confirm the deployment.

    The Process Designer is unavailable until the deployment completes.

What to do next

Next you create a business rule to implement the event handler.