Self Service Designs Import
The Self Service Design can be imported into Xurrent using UTF-8 or UTF-16LE encoded comma-separated values (CSV) or tab-separated values (TSV) files.
Detailed information about the data that can be specified in the columns of a Self Service Designs import file can be found in Self Service Design API - Fields.
An account has one Self Service Design, so an import file has one row and no ID column. The row
changes the design of the account that the file is imported into. The import reports an error for
each other row. The import is available for accounts that do not use classic Self Service. The
OAuth token needs the Create action of the import scope, and the Create and Update actions of the
self-service-design scope.
The values go into the version that is being prepared, as an update
does. Only the columns in the file are changed. When Activate is true, the prepared version
becomes the Active version. A row that changes nothing counts as unchanged, so an import of an
export saves no new version.
An export holds the Active version, and its Activate column is always true. An account that has
no saved design, or that uses classic Self Service, exports no row.
External Images
Unlike the API, an import downloads the external images of the HTML and the CSS:
- each
httporhttpsimage in thesrcandsrcsetattributes of an<img>or<source>element, and - each URL in a CSS
url(...),
that does not come from a Xurrent host. Each image goes into a Media File of the account, and the design then refers to that Media File. An image that is already in the Media Library is used again. Images in the Fonts column, URLs with Liquid code in them, and links that are not images are left as they are.
Only PNG, JPEG, GIF and WebP images are imported, and at most 10 images per row. A download follows no redirect. When an image cannot be imported, the row fails with an error in the import log that names the image. A row that fails saves nothing, also no new Media File.
CSV Example
HTML,CSS,Fonts,Font,Light mode background color,Dark mode background color,Light mode button color,Dark mode button color,Light mode button text color,Dark mode button text color,Light mode accent color,Dark mode accent color,Light mode accessibility color,Dark mode accessibility color,Show chat widget,Chat box name,Welcome message,Show AI disclaimer,Use custom disclaimer message,Custom disclaimer message,Activate
"<self-service-header><self-service-nav></self-service-nav></self-service-header><self-service-homepage><h1>Welcome</h1><img src=""https://widget.com/images/hero.png""></self-service-homepage>",".hero { background: url(https://widget.com/images/background.jpg); }",,roboto,#e9ecef,#111827,#7800d3,#0284c7,#FFFFFF,#FFFFFF,#0369a1,#0ea5e9,#38bdf8,#38bdf8,true,Support,Hello! How can we help?,true,true,Check important answers with the service desk.,true