Copy programmable decisions
There are a few different ways of copying programmable decisions, depending on whether you want to make it available just for yourself, or share it with others in your organization:
-
To make the programmable decision available as a component on the decision palette which all users in your organization can access, you can create a decision template.
NoteDid you know about forms for decision templates?
If you create a decision template you can even configure a form to display when a business user adds a programmable decision to the canvas. This enables business colleagues to further configure decisioning logic without ever having to write, edit, or view code.
-
Copy and paste JavaScript from one programmable to another.
-
Download the programmable as a .txt file.
Copy JavaScript from a programmable decision
You can copy the code from a programmable decision to your clipboard. You might want to do this if you immediately want to use some or all of the code in another programmable decision.
To copy all the code from a programmable decision:
-
From the Programmable tab, click
and click Copy All. The code is copied to your clipboard. -
Navigate to or create another Programmable tab.
-
Paste the code from your clipboard onto the Programmable tab.
Copy programmable decisions between decision models
There are often times where you want to copy a programmable decision from one decision model to another. To do this, you must download it as a .txt file and then upload it to the decision canvas in the new decision model.
Download programmable decisions
You can download a programmable decision as a .txt file to a local drive. This can be useful when you want to use a programmable decision created in one decision model with another decision model. You can follow this procedure and then upload it to another decision model.
To download a programmable decision to a local drive:
-
From the Programmable tab, click
and click Download. Sitecore Personalize downloads the .txtfile to a local drive. -
Upload the
.txtfile to the decision canvas.
Upload programmable decisions
You can upload a programmable decision as a .txt file to a local drive. This can be useful if you downloaded a programmable decision from another decision model.
To upload a programmable decision from a local drive:
-
From the Programmable tab, click
and click Upload. An upload window displays. -
Search for and select the .txt file of the Programmable Decision you want to upload.