app.yml
This topic describes the app.yml
file as it pertains to your application in Optimizely Connect Platform (OCP).
The app.yml
file includes the definition of your app—including store details, runtime, and functions and jobs that your app will use.
Example
meta:
app_id: sample_app
display_name: Sample App
version: 0.0.0
vendor: optimizely
summary: A sample app
support_url: https://www.optimizely.com
support_email: [email protected]
legal_url: https://optimizely.com/privacy_policy
categories:
- Accounting & Finance
runtime: node12
environment:
- APP_ENV_GLOBAL_SECRET
functions:
handle_event:
entry_point: HandleEvent
description: Transforms incoming data into ODP events
jobs:
historical_import:
entry_point: HistoricalImport
description: Performs a one-time historical import when triggered
nightly_import:
entry_point: NightlyImport
# runs at midnight every night
cron: 0 0 0 ? * *
description: Performs a nightly import for data that isn't provided or needed in real time
liquid_extensions:
generate_coupon:
entry_point: GenerateCoupon
description: Generates a unique coupon code
input:
rule:
type: string
required: true
description: The coupon rule to create the coupon from
email:
type: string
required: false
description: Email address to tie the coupon code to
channel:
grouping: messenger
targeting:
- identifier: sample_app_messenger_id
options:
prepare: true
Example Data Integration
This app pulls data from an ESP. The Import
job can handle both the historical import and hourly pulls. The GetEspLists
allows for listing the Lists that exist in the ESP that you can import.
meta:
app_id: esp_collect
display_name: ESP Collection App
version: 0.0.0
vendor: optimizely
summary: An app that imports contacts and activity
support_url: https://www.optimizely.com
support_email: [email protected]
categories:
- Marketing Automation
runtime: node12
functions:
get_esp_lists:
entry_point: GetEspLists
description: Pulls the lists from the ESP to select which ones you want imported
jobs:
import:
entry_point: Import
description: Performs a one-time historical import when triggered
# Runs every hour
cron: 0 0 * * * ?
Example Channel Integration
This app integrates into an SMS vendor for sending. It has the SmsCallbackHandler
that gets the webhook activity that comes from the vendor. It also has all of the details about the channel, how reachability is handled and what type of identifiers are supported.
meta:
app_id: sms
display_name: SMS
version: 0.0.0
vendor: optimizely
summary: Deliver transactional and promotional messages over SMS from any ODP campaign
support_url: https://apps.optimizely.com/sms
contact_email: [email protected]
categories:
- Channel
runtime: node12
functions:
sms_callback:
entry_point: SmsCallbackHandler
description: Handles incoming messages and events about message delivery
channel:
type: sms
targeting:
- identifier: phone
options:
prepare: false
events:
send: true
delivery: true
delivery_unknown: true
hard_bounce: true
soft_bounce: true
spam_report: false
active_actions:
- engage
- disengage
Updated about 2 months ago
Did this page help you?