SlideShare a Scribd company logo
1 of 4
Download to read offline
CustomerState vs. SessionState
CustomerState is information associated with an individual mobile user. It should be used to store
permanent information associated with a mobile user, such as their name, their home address, and
other bits of information that is unique to a user and relevant to your eTXT application.

SessionState is information that is temporary, and lasts for approximately 60 minutes since the last
time a user responded to a message from your application. It should be used to track temporary
information that is only relevant for a particular “conversation” between the application and a
mobile user. Examples include the current page in an SMS “wizard”, as well as information
previously collected as part of that dialogue.

SessionState explained
Have you ever left your web-browser open on a secure page for a while not doing anything.....Then
you go back to it and click a link and it says "Sorry, your session has timed out please login again"?

A session in the eTXT API works in the same way. When 60 minutes have passed since the user last
interacted with an application, the system ends their session. When this expires, any temporary
information – such as where you were on a web page, the contents of your shopping cart, and other
temporary information, is gone.

Session information will be passed in the sessionstate member of the request object passed to your
application.

CustomerState explained
CustomerState is like the information that exists after you have logged into a web site. This
“permanent” information would include things like your name, your mailing address, and your credit
card details…something that should remain the same across multiple computers and browser
“sessions.”

CustomerState information in the eTXT API is information that will always be sent to the callback
URL irrespective of which session is currently active. It will be passed in the customerstate member
of the request object passed to your application.
Example JSON Code 1
This example demonstrates setting the customer state. Customer state, once set, will cross session
boundaries, and be sent each time until changed. This demonstrates a theoretical restaurant service
which finds restaurants near to a particular street location. It is triggered by sending #restaurant to
30000

        Request 1

        …HTTP Headers…
        {
               "customerstate":null,
               "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618",
               "msg":"#restaurant",
               "sessionstate":null
        }

        Response 1

        …HTTP Headers…
        {
               "customerstate":null,
               "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618",
               "msg":"Hello, what is your name?",
               "sessionstate":null
        }

        Request 2 (continuation of session)

        …HTTP Headers…
        {
               "customerstate":null,
               "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618",
               "msg":"John",
               "sessionstate":null
        }

        Response 2

        …HTTP Headers…
        {
               "customerstate":”John”,
               "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618",
               "msg":"Hello John, Reply with your street address",
               "sessionstate":null
        }
Example JSON Code (new session)
This shows use of session state, which is a temporary store of information that lasts for around 60
seconds. It also shows the persistence of customer state, which is passed again to the application
URL because it was set in a previous session. As before, it is triggered by sending #restaurant to
30000

        Request 1 (new session)

        …HTTP Headers…
        {
               "customerstate":”John”,
               "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618",
               "msg":"#restaurant",
               "sessionstate":null
        }

        Response 1

        …HTTP Headers…
        {
               "customerstate":”John”,
               "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618",
               "msg":"Hello John, what is street address?",
               "sessionstate":null
        }

        Request 2 (enter street address)

        …HTTP Headers…
        {
               "customerstate":”John”,
               "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618",
               "msg":"7172 Hawthorn Ave",
               "sessionstate":null
        }

        Response 2

        …HTTP Headers…
        {
               "customerstate":”John”,
               "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618",
               "msg":"What is your city?",
               "sessionstate":”7172 Hawthorn Ave”
        }
Request 3 (enter city)

…HTTP Headers…
{
       "customerstate":”John”,
       "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618",
       "msg":"Los Angeles",
       "sessionstate":”7172 Hawthorn Ave”
}

Response 3

…HTTP Headers…
{
       "customerstate":”John”,
       "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618",
       "msg":"Here are the restaurants near 7172 Hawthorn Ave: …",
       "sessionstate":”7172 Hawthorn Ave|Los Angeles”
}

More Related Content

Similar to Customer state v Session state

Eurosentiment - Developing a new service
Eurosentiment - Developing a new serviceEurosentiment - Developing a new service
Eurosentiment - Developing a new servicemario_munoz
 
Bringing Transactional Guarantees to MongoDB
Bringing Transactional Guarantees to MongoDBBringing Transactional Guarantees to MongoDB
Bringing Transactional Guarantees to MongoDBPaul Robinson
 
Small pieces loosely joined
Small pieces loosely joinedSmall pieces loosely joined
Small pieces loosely joinedennui2342
 
Mongo Web Apps: OSCON 2011
Mongo Web Apps: OSCON 2011Mongo Web Apps: OSCON 2011
Mongo Web Apps: OSCON 2011rogerbodamer
 
How to ship customer value faster with step functions
How to ship customer value faster with step functionsHow to ship customer value faster with step functions
How to ship customer value faster with step functionsYan Cui
 
Mongo db world 2014 billrun
Mongo db world 2014   billrunMongo db world 2014   billrun
Mongo db world 2014 billrunMongoDB
 
Powering Heap With PostgreSQL And CitusDB (PGConf Silicon Valley 2015)
Powering Heap With PostgreSQL And CitusDB (PGConf Silicon Valley 2015)Powering Heap With PostgreSQL And CitusDB (PGConf Silicon Valley 2015)
Powering Heap With PostgreSQL And CitusDB (PGConf Silicon Valley 2015)Dan Robinson
 
Hatohol technical-brief-20130830-hbstudy
Hatohol technical-brief-20130830-hbstudyHatohol technical-brief-20130830-hbstudy
Hatohol technical-brief-20130830-hbstudykoedoyoshida
 
Liquid Stream Processing Across Web Browsers and Web Servers
Liquid Stream Processing Across Web Browsers and Web ServersLiquid Stream Processing Across Web Browsers and Web Servers
Liquid Stream Processing Across Web Browsers and Web ServersMasiar Babazadeh
 
Streaming Way to Webscale: How We Scale Bitly via Streaming
Streaming Way to Webscale: How We Scale Bitly via StreamingStreaming Way to Webscale: How We Scale Bitly via Streaming
Streaming Way to Webscale: How We Scale Bitly via StreamingAll Things Open
 
LJC Conference 2014 Cassandra for Java Developers
LJC Conference 2014 Cassandra for Java DevelopersLJC Conference 2014 Cassandra for Java Developers
LJC Conference 2014 Cassandra for Java DevelopersChristopher Batey
 
Luciano Mammino - Cracking JWT tokens: a tale of magic, Node.JS and parallel...
Luciano Mammino  - Cracking JWT tokens: a tale of magic, Node.JS and parallel...Luciano Mammino  - Cracking JWT tokens: a tale of magic, Node.JS and parallel...
Luciano Mammino - Cracking JWT tokens: a tale of magic, Node.JS and parallel...Codemotion
 
Cracking JWT tokens: a tale of magic, Node.JS and parallel computing
Cracking JWT tokens: a tale of magic, Node.JS and parallel computingCracking JWT tokens: a tale of magic, Node.JS and parallel computing
Cracking JWT tokens: a tale of magic, Node.JS and parallel computingLuciano Mammino
 
MongoDB Stitch Introduction
MongoDB Stitch IntroductionMongoDB Stitch Introduction
MongoDB Stitch IntroductionMongoDB
 
mDevCamp 2016 - Zingly, or how to design multi-banking app
mDevCamp 2016 - Zingly, or how to design multi-banking appmDevCamp 2016 - Zingly, or how to design multi-banking app
mDevCamp 2016 - Zingly, or how to design multi-banking appPetr Dvorak
 
[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise
[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise
[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital EnterpriseWSO2
 
2011 05-23 metrics-agilasverige-english
2011 05-23 metrics-agilasverige-english2011 05-23 metrics-agilasverige-english
2011 05-23 metrics-agilasverige-englishMårten Gustafson
 

Similar to Customer state v Session state (19)

Eurosentiment - Developing a new service
Eurosentiment - Developing a new serviceEurosentiment - Developing a new service
Eurosentiment - Developing a new service
 
SignalR
SignalRSignalR
SignalR
 
Into The Box 2018 cbelasticsearch
Into The Box 2018   cbelasticsearchInto The Box 2018   cbelasticsearch
Into The Box 2018 cbelasticsearch
 
Bringing Transactional Guarantees to MongoDB
Bringing Transactional Guarantees to MongoDBBringing Transactional Guarantees to MongoDB
Bringing Transactional Guarantees to MongoDB
 
Small pieces loosely joined
Small pieces loosely joinedSmall pieces loosely joined
Small pieces loosely joined
 
Mongo Web Apps: OSCON 2011
Mongo Web Apps: OSCON 2011Mongo Web Apps: OSCON 2011
Mongo Web Apps: OSCON 2011
 
How to ship customer value faster with step functions
How to ship customer value faster with step functionsHow to ship customer value faster with step functions
How to ship customer value faster with step functions
 
Mongo db world 2014 billrun
Mongo db world 2014   billrunMongo db world 2014   billrun
Mongo db world 2014 billrun
 
Powering Heap With PostgreSQL And CitusDB (PGConf Silicon Valley 2015)
Powering Heap With PostgreSQL And CitusDB (PGConf Silicon Valley 2015)Powering Heap With PostgreSQL And CitusDB (PGConf Silicon Valley 2015)
Powering Heap With PostgreSQL And CitusDB (PGConf Silicon Valley 2015)
 
Hatohol technical-brief-20130830-hbstudy
Hatohol technical-brief-20130830-hbstudyHatohol technical-brief-20130830-hbstudy
Hatohol technical-brief-20130830-hbstudy
 
Liquid Stream Processing Across Web Browsers and Web Servers
Liquid Stream Processing Across Web Browsers and Web ServersLiquid Stream Processing Across Web Browsers and Web Servers
Liquid Stream Processing Across Web Browsers and Web Servers
 
Streaming Way to Webscale: How We Scale Bitly via Streaming
Streaming Way to Webscale: How We Scale Bitly via StreamingStreaming Way to Webscale: How We Scale Bitly via Streaming
Streaming Way to Webscale: How We Scale Bitly via Streaming
 
LJC Conference 2014 Cassandra for Java Developers
LJC Conference 2014 Cassandra for Java DevelopersLJC Conference 2014 Cassandra for Java Developers
LJC Conference 2014 Cassandra for Java Developers
 
Luciano Mammino - Cracking JWT tokens: a tale of magic, Node.JS and parallel...
Luciano Mammino  - Cracking JWT tokens: a tale of magic, Node.JS and parallel...Luciano Mammino  - Cracking JWT tokens: a tale of magic, Node.JS and parallel...
Luciano Mammino - Cracking JWT tokens: a tale of magic, Node.JS and parallel...
 
Cracking JWT tokens: a tale of magic, Node.JS and parallel computing
Cracking JWT tokens: a tale of magic, Node.JS and parallel computingCracking JWT tokens: a tale of magic, Node.JS and parallel computing
Cracking JWT tokens: a tale of magic, Node.JS and parallel computing
 
MongoDB Stitch Introduction
MongoDB Stitch IntroductionMongoDB Stitch Introduction
MongoDB Stitch Introduction
 
mDevCamp 2016 - Zingly, or how to design multi-banking app
mDevCamp 2016 - Zingly, or how to design multi-banking appmDevCamp 2016 - Zingly, or how to design multi-banking app
mDevCamp 2016 - Zingly, or how to design multi-banking app
 
[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise
[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise
[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise
 
2011 05-23 metrics-agilasverige-english
2011 05-23 metrics-agilasverige-english2011 05-23 metrics-agilasverige-english
2011 05-23 metrics-agilasverige-english
 

Recently uploaded

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 

Recently uploaded (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 

Customer state v Session state

  • 1. CustomerState vs. SessionState CustomerState is information associated with an individual mobile user. It should be used to store permanent information associated with a mobile user, such as their name, their home address, and other bits of information that is unique to a user and relevant to your eTXT application. SessionState is information that is temporary, and lasts for approximately 60 minutes since the last time a user responded to a message from your application. It should be used to track temporary information that is only relevant for a particular “conversation” between the application and a mobile user. Examples include the current page in an SMS “wizard”, as well as information previously collected as part of that dialogue. SessionState explained Have you ever left your web-browser open on a secure page for a while not doing anything.....Then you go back to it and click a link and it says "Sorry, your session has timed out please login again"? A session in the eTXT API works in the same way. When 60 minutes have passed since the user last interacted with an application, the system ends their session. When this expires, any temporary information – such as where you were on a web page, the contents of your shopping cart, and other temporary information, is gone. Session information will be passed in the sessionstate member of the request object passed to your application. CustomerState explained CustomerState is like the information that exists after you have logged into a web site. This “permanent” information would include things like your name, your mailing address, and your credit card details…something that should remain the same across multiple computers and browser “sessions.” CustomerState information in the eTXT API is information that will always be sent to the callback URL irrespective of which session is currently active. It will be passed in the customerstate member of the request object passed to your application.
  • 2. Example JSON Code 1 This example demonstrates setting the customer state. Customer state, once set, will cross session boundaries, and be sent each time until changed. This demonstrates a theoretical restaurant service which finds restaurants near to a particular street location. It is triggered by sending #restaurant to 30000 Request 1 …HTTP Headers… { "customerstate":null, "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618", "msg":"#restaurant", "sessionstate":null } Response 1 …HTTP Headers… { "customerstate":null, "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618", "msg":"Hello, what is your name?", "sessionstate":null } Request 2 (continuation of session) …HTTP Headers… { "customerstate":null, "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618", "msg":"John", "sessionstate":null } Response 2 …HTTP Headers… { "customerstate":”John”, "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618", "msg":"Hello John, Reply with your street address", "sessionstate":null }
  • 3. Example JSON Code (new session) This shows use of session state, which is a temporary store of information that lasts for around 60 seconds. It also shows the persistence of customer state, which is passed again to the application URL because it was set in a previous session. As before, it is triggered by sending #restaurant to 30000 Request 1 (new session) …HTTP Headers… { "customerstate":”John”, "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618", "msg":"#restaurant", "sessionstate":null } Response 1 …HTTP Headers… { "customerstate":”John”, "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618", "msg":"Hello John, what is street address?", "sessionstate":null } Request 2 (enter street address) …HTTP Headers… { "customerstate":”John”, "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618", "msg":"7172 Hawthorn Ave", "sessionstate":null } Response 2 …HTTP Headers… { "customerstate":”John”, "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618", "msg":"What is your city?", "sessionstate":”7172 Hawthorn Ave” }
  • 4. Request 3 (enter city) …HTTP Headers… { "customerstate":”John”, "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618", "msg":"Los Angeles", "sessionstate":”7172 Hawthorn Ave” } Response 3 …HTTP Headers… { "customerstate":”John”, "id":"09883dc9-a90c-4bb6-b71f-73e94a56e618", "msg":"Here are the restaurants near 7172 Hawthorn Ave: …", "sessionstate":”7172 Hawthorn Ave|Los Angeles” }