-
Notifications
You must be signed in to change notification settings - Fork 20
Application Namespacing
When a sandboxed vumi-go application is running it has access to various data-stores. When reading and writing from these data-stores you should consider the impact of design choices you make as a result.
When accessing the contact store via the API you are accessing the contacts for your vumi-go account.
The contacts store provides get
, get_or_create
, update
, update_extras
, update_subscriptions
, new
and save
methods. Due to the wide scope, contacts available across conversation types. This means you can create an populate a contact via a USSD conversation in a javascript sandbox app and then send them follow up SMS's via another conversation type such as Sequential Send.
Extras are useful for storing application specific values against contacts (such as the date the signed up). However due to the account-level scope you should consider prefixing values to ensure the behaviour you expect. Currently when using the extras, remember that when setting extras just use the key name but when reading them back you need to append "extras-". E.g. my_app_signup (for write), extras-my_app_signup (for read).
See a short example of the code required here
When accessing the key-value (kv) store via the API the keys are name-spaced using your vumi-go account key.
The kv store provides set
, get
and incr
operations. This would allow you to count things like total users across a number of transports within your account.
See a short example of the code required here