WEBVTT

00:00.420 --> 00:04.320
Step one is to create a new slot
schema using the schema editor.

00:06.680 --> 00:11.140
To do this, we'll just cut and paste an
example from our docs and modify it to contain

00:11.160 --> 00:13.100
the content types that we want to support.

00:13.740 --> 00:16.920
I'm just gonna paste this into
the schema editor and modify it.

00:18.020 --> 00:22.380
In Dynamic Content, I'll open the schema
editor by going to the development homepage

00:22.460 --> 00:23.560
and create a new schema.

00:24.540 --> 00:27.500
For the schema ID, you can use any valid URL.

00:28.180 --> 00:35.080
I'll just call it sfccslotschema.json,
and I'll set up its validation to

00:35.120 --> 00:36.620
show it's being used as a slot.

00:41.680 --> 00:48.320
Paste in the example schema and change the

00:48.420 --> 00:51.300
ID back to match the schema ID I just set up.

00:52.540 --> 00:53.660
Now it's a valid schema.

00:54.660 --> 00:59.089
Next, I need to modify the enum to
include the content types that I want

00:59.120 --> 01:00.340
to include in this slot.

01:01.760 --> 01:05.860
I'll see what other content types I have in
this hub, and I'll include the content type

01:05.920 --> 01:09.580
IDs of any content types I
want to include in the slot.

01:13.100 --> 01:14.640
And here's a list I already prepared.

01:17.880 --> 01:22.540
And here's a preview of what a slot will look
like when you create it from this schema.

01:24.400 --> 01:28.520
Now we just save the schema,
and we're ready to register it.

01:29.430 --> 01:32.980
The next step is to register
this slot schema as a slot type.

01:35.840 --> 01:37.540
I pick the schema I just created.

01:39.980 --> 01:46.900
Give it a label and then
associate it with a slot

01:46.960 --> 01:52.300
repository.
Then save it, and the slot

01:52.400 --> 01:53.480
type is now registered.

01:55.490 --> 02:00.210
The next step is to create a handlebars
wrapper template and upload it to Content Hub.

02:01.100 --> 02:05.680
This is used by the integration to create
the HTML for the slot configuration using the

02:05.740 --> 02:07.760
Amplience content rendering service.

02:08.920 --> 02:12.000
The template needs to work with
the slot type we just created.

02:13.840 --> 02:17.800
There's an example of a handlebars
wrapper template in our documentation.

02:18.920 --> 02:23.060
It refers to a template called template
chooser that chooses the appropriate

02:23.100 --> 02:26.920
handlebars partial for each
content type contained in the slot.

02:29.220 --> 02:31.520
Now, we already have
template chooser on the hub.

02:32.020 --> 02:34.700
We just need to create a
top level wrapper template.

02:36.920 --> 02:43.920
So I'll copy the code from the example,
paste this into an HTML file, and I

02:43.980 --> 02:50.520
just need to modify the reference from page
site ID JSON to refer to the slot type I

02:50.560 --> 02:51.620
created previously.

02:54.860 --> 02:56.040
And I'll just make the change.

02:58.180 --> 03:02.220
Then I'll save the template as sfccslot.html.

03:02.760 --> 03:06.300
Now, it needs to have the HTML
extension to work with the Amplience

03:06.400 --> 03:07.810
content rendering service.

03:08.580 --> 03:12.800
Finally, I'll upload it to
Content Hub and publish it.

03:15.560 --> 03:19.720
Now I've got the slot type and handlebars
template set up, I can go ahead

03:19.760 --> 03:21.010
and create an integration.

03:22.160 --> 03:27.380
To do this, I'll need the Dynamic Content
client ID and secret and the SFCC client ID

03:27.400 --> 03:30.600
and secret.
In this example, I want to integrate with an

03:30.660 --> 03:33.540
SFCC site called Mobile First.

03:34.700 --> 03:36.760
I'll also need an ISML template.

03:37.260 --> 03:39.720
You can find more details about
this in the documentation.

03:40.680 --> 03:45.100
And finally, we'll also need to specify the
handlebars template that we created in the

03:45.140 --> 03:49.980
previous step.
To create a new integration, go to the

03:50.000 --> 03:55.880
integrations homepage and choose view or
add Salesforce Commerce Cloud integration,

03:57.260 --> 03:59.560
and then click add new integration.

04:03.800 --> 04:05.180
Give the integration a label.

04:07.120 --> 04:13.460
Add in the Dynamic Content client ID and
secret and the SFCC client ID and secret.

04:15.490 --> 04:20.430
Then add the path to your
OCAPI API and the API version.

04:21.540 --> 04:25.440
Next, you need to add the content
rendering service virtual staging URL.

04:25.920 --> 04:31.490
This URL will be set up for you by Amplience,
and it's usually the same URL as is shown in

04:31.520 --> 04:32.540
your preview settings.

04:34.800 --> 04:36.640
Then add the content rendering template.

04:37.040 --> 04:42.000
This will be the wrapper template we
created earlier, minus the .html suffix.

04:48.220 --> 04:52.680
And then I need to add either one
of content slots or content assets.

04:53.820 --> 04:57.260
Now in this case, we're setting
up a content slots integration, so

04:57.280 --> 04:58.720
we'll choose content slots.

05:00.480 --> 05:06.980
We'll specify the site ID, which in this
case is Mobile First, and the ISML template.

05:09.260 --> 05:12.100
And that's all the settings I need
for a content slot integration,

05:12.740 --> 05:13.920
so I can just save that.

05:18.140 --> 05:19.580
And a webhook is now shown.

05:20.280 --> 05:24.360
We can use this to view requests and responses
from the integration, and it's great for

05:24.400 --> 05:25.420
tracking down errors.

05:27.540 --> 05:32.280
Setting up a preview app is an optional step,
but it makes things a lot easier for the user.

05:32.920 --> 05:36.900
You don't need to set this up if you're just
doing a content assets integration, but it's

05:36.980 --> 05:39.180
really useful for a slot-based integration.

05:39.920 --> 05:42.960
In the documentation, we
have an example preview URL.

05:43.250 --> 05:48.100
You just need to include your site URL from
your Commerce Cloud storefront and add an

05:48.160 --> 05:52.860
additional URL parameter that specifies the
date at which the preview will be shown.

05:53.520 --> 05:58.940
We'll just open preview settings
and add a new preview app.

06:01.440 --> 06:07.864
Give it a label.
Add the parameter and date format from the

06:07.924 --> 06:12.224
example, and add our storefront URL.

06:15.524 --> 06:16.844
And then we'll save the preview.

06:19.904 --> 06:23.064
Now that the integration is set
up, we just need to test it.

06:23.684 --> 06:29.084
I'll create a slot using the slot type I set
up previously, and map this slot to a content

06:29.224 --> 06:30.924
slot in SFCC.

06:32.264 --> 06:38.384
Then I'll add the slot to an edition, add some
content to it, schedule the edition, and then

06:38.504 --> 06:40.824
preview it in SFCC storefront.

06:41.564 --> 06:46.553
To create a slot, I go to production view and
choose the slots repository where I registered

06:46.553 --> 06:51.244
the slot type.
Create a new slot and choose SFCC slot, which

06:51.284 --> 06:53.674
is the label I gave the
slot when it was registered.

06:54.724 --> 06:59.404
The slot ID is going to match
the ID of a content slot in SFCC.

07:00.664 --> 07:07.664
So in SFCC Business Manager, I'll open up
content slots, find the one I want, in this

07:07.724 --> 07:12.604
case, a homepage slot, and copy its ID.

07:17.704 --> 07:22.884
Then I'll paste it into the slot I'm creating,
and the contents of this slot will then be

07:22.984 --> 07:25.444
mapped to the content slot in SFCC.

07:27.144 --> 07:32.384
Finally, I'll save the slot and give it a
name that allows me to identify it easily.

07:37.784 --> 07:41.564
Now, in the planning view, I want to add
an addition to the spring launch event.

07:43.084 --> 07:45.644
I'll call it Spring Mobile First Edition.

07:48.804 --> 07:52.404
Save the edition.
And now I want to add my

07:52.464 --> 07:53.704
new slot to the edition.

07:59.964 --> 08:01.304
I'll add some content to it.

08:05.784 --> 08:08.744
And now with some content added,
I'm ready to schedule the edition.

08:12.964 --> 08:14.784
We can ignore the warnings in this case.

08:18.044 --> 08:19.644
And the edition is now scheduled.

08:23.604 --> 08:28.364
So let's preview the storefront at the date
when this edition is scheduled to go live.

08:30.664 --> 08:36.184
We'll click the Preview button, choose
the right preview app for the mobile first

08:36.204 --> 08:41.744
storefront, and the date and time,
and then we'll launch the preview.

08:44.164 --> 08:47.064
And here's our content in the mobile first
storefront.

