Test Service Installation with Mock Services
The mock API implementation displays the available time slots on the Service Installation page in the checkout flow.
Note: This application starts only in a machine with Nodejs
installed.
Steps to start mock project:
- Provide available time slots in the file slots.json or availableSlots.json. Use
the format for date and time slot as shown in the following sample:
{ "dates": [ { "date": "2023-11-06T00:00:00.000Z", "timeSlots": [ { "timeSlot": "9am to 10am" }, { "timeSlot": "10am to 11am" }, { "timeSlot": "2pm to 3pm" }, { "timeSlot": "4pm to 5pm" } ] }, { "date": "2023-11-09T00:00:00.000Z", "timeSlots": [ { "timeSlot": "8am to 9am" }, { "timeSlot": "11am to 12pm" }, { "timeSlot": "12pm to 1pm" }, { "timeSlot": "2pm to 3pm" }, { "timeSlot": "3pm to 4pm" }, { "timeSlot": "4pm to 5pm" } ] } ] }
- Start the application by running the node index.js command from dx4c-appointment-handle folder.
- Verify if the API is started correctly by accessing the following URL:For server deployed app with secure mode (IS_LOCAL: N)
https://<hostname>:<port>/api/01/getAvailableSlots
- Configure the API URL in Storefront configuration variable:
dx4cInstallationScheduleServiceUrl
https://<hostname>:<port>
Configure Oracle Commerce Cloud Settings
Here's how you can:
- Configure the URL in the Oracle Commerce Cloud settings (DX4C store site settings) in the Service Installation Scheduling URL field.
- Publish the changes.
- Click Default under Changes.
- Select changes done on the Page Repository Site.
- Click Publish Workset button to publish.
Done dialog box appears.
Access API URL from Storefront UI
You can access this API URL:
https://<hostname>:<port>/api/01/getAvailableSlots
Steps to Add Terms and Conditions PDF File for Downloading from Service Installation Page in the Checkout Flow
Note: Terms and Conditions link is a placeholder to provide PDF
for the client.
Steps to upload the PDF document:
- Identify a Terms and Conditions PDF file.
- Upload the PDF with slug name 1481787191863-termsandconditions in Storefront
connected OCE in DX4C_Assets.Sample value to enter in the request:
{"name": "TermsAndConditions.pdf","repositoryId": "{{REPOSITORY_ID}}","type": "DX4C-Asset", "slug": "1481787191863-termsandconditions"}
- Publish the PDF file.
- Download the PDF from service installation step in the checkout flow.
Provide the slug name for the PDF in Oracle Content and Experience as 1481787191863-termsandconditions.