---
title: "Action: Subscriptions"
description: "Subscription definitions. Imports subscription definitions that describe how recurring sales orders or invoices are generated."
url: https://support.sapera.io/en/articles/619-action-subscriptions
collection: "SyncTool"
updated: 2026-09-25
language: en
alternates: [da]
---

# Action: Subscriptions

Subscription definitions. Imports subscription definitions that describe how recurring sales orders or invoices are generated.

**Subscription definitions.** Imports subscription definitions that describe how recurring sales orders or invoices are generated.

**Subscription lines.** Imports the product lines that belong to a subscription.

**Customer subscriptions.** Imports the customer-specific assignments of subscriptions, including pricing adjustments and run periods.

## How to use the action

1\. Select the action in the **Action** field. 2. Point to your data source – a **file** (CSV or Excel) or a **SQL query**. 3. Map the source columns to Sapera's fields in the column mapping (see _Source fields_ below). 4. Run **Compare** to see what will be created, changed or stay unchanged – without writing to Sapera. 5. Run **Update Sapera** to perform the import.

Use the **Allow create** and **Allow update** parameters to control whether new rows are created and whether existing ones are updated.

## How matching and updating works

Import in order: first **subscription definitions** (the _Subscriptions_ action), then **subscription lines** (_Subscription lines_) and finally **customer subscriptions** (_Customer subscriptions_).

-   Definitions are matched on **system name** (SystemName); lines on the **subscription system name + line number**; customer subscriptions on **system name + customer + subject**.
    
-   Definitions and lines describe _how_ recurring orders/invoices are generated; customer subscriptions assign the subscription to specific customers with price adjustment and run period.
    
-   Matching records are updated and new ones created. Direction: from file/SQL into Sapera.
    

## Key parameters

### Subscription definitions

<table data-id="dc467e30-cf40-4d3d-aa64-22ee7c0ed375" style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p data-id="8a31b728-9471-4b1f-9fc5-0f02a1fe7d87" style="text-align: left;"><strong>Parameter</strong></p></td><td colspan="1" rowspan="1"><p data-id="7cae4fe0-f0f8-4598-9d29-8a3fdab15e8f" style="text-align: left;"><strong>Explanation</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="68db66a1-c693-4803-9c31-06dff813f54f" style="text-align: left;">AllowCreate</p></td><td colspan="1" rowspan="1"><p data-id="40dbf987-009a-4e71-b81c-59846347dbb5" style="text-align: left;">When enabled, subscriptions that do not yet exist are created.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="e0db896b-b117-46f5-a2d0-e75625cadb79" style="text-align: left;">AllowUpdate</p></td><td colspan="1" rowspan="1"><p data-id="766baacc-45e0-455d-9a6e-932451ccb4d1" style="text-align: left;">When enabled, existing subscriptions are updated with the imported values.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="ada481db-f0e1-4758-875f-99ef72d2e362" style="text-align: left;">IsDelete</p></td><td colspan="1" rowspan="1"><p data-id="636c77bc-b830-49c0-b2de-a037c849ae0f" style="text-align: left;">When enabled, the matched subscriptions are deleted instead of created or updated.</p></td></tr></tbody></table>

### Subscription lines

<table data-id="3307b7f5-e411-4bc6-a0d6-c14bd8d8ec51" style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p data-id="616ea43d-97e6-4419-b5cd-7b6f37c1b194" style="text-align: left;"><strong>Parameter</strong></p></td><td colspan="1" rowspan="1"><p data-id="8aaabf7c-adb1-4e9d-b4de-71ad0222efb0" style="text-align: left;"><strong>Explanation</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="a00b775b-0f72-40dc-8fe1-9560a99bd844" style="text-align: left;">AllowCreate</p></td><td colspan="1" rowspan="1"><p data-id="578699fa-ad9e-4971-aeb4-fe34920b0db8" style="text-align: left;">When enabled, subscription items that do not yet exist are created.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="8fe753a1-9b2a-4a0a-9cf0-807636a7575b" style="text-align: left;">AllowUpdate</p></td><td colspan="1" rowspan="1"><p data-id="7c92c688-4aee-4c6d-a8b6-57b53214532e" style="text-align: left;">When enabled, existing subscription items are updated with the imported values.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="744fbc44-49ef-4786-9b43-be034317ca6a" style="text-align: left;">IsDelete</p></td><td colspan="1" rowspan="1"><p data-id="b11d3cc5-b22b-4457-85ba-8e8e45e3688c" style="text-align: left;">When enabled, the matched subscription items are deleted instead of created or updated.</p></td></tr></tbody></table>

### Customer subscriptions

<table data-id="8efe9294-e411-450f-8ed2-e29fe85cb246" style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p data-id="df889a3b-8f41-44a4-8935-f6034f46ee63" style="text-align: left;"><strong>Parameter</strong></p></td><td colspan="1" rowspan="1"><p data-id="a3aa92be-b0a8-4c71-823d-3a3c287f2be4" style="text-align: left;"><strong>Explanation</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="2af8cbc7-779e-4759-873d-81a82547568d" style="text-align: left;">AllowCreate</p></td><td colspan="1" rowspan="1"><p data-id="5927078d-cc3a-4eed-b4ba-d6beb9ead2b4" style="text-align: left;">When enabled, customer subscriptions that do not yet exist are created.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="e4665746-4fb4-4fe8-b8a4-1da8a50fa82a" style="text-align: left;">AllowUpdate</p></td><td colspan="1" rowspan="1"><p data-id="d22481ab-effd-4fd3-a5b8-31ec0598044d" style="text-align: left;">When enabled, existing customer subscriptions are updated with the imported values.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="6cab94e7-c2bc-4b0b-86fe-5147127e4578" style="text-align: left;">IsDelete</p></td><td colspan="1" rowspan="1"><p data-id="c4d35464-82d8-474c-b2f9-b0fae5251aac" style="text-align: left;">When enabled, the matched customer subscriptions are deleted instead of created or updated.</p></td></tr></tbody></table>

## Source fields

### Subscription definitions

<table data-id="e0defc87-b37f-4091-bf57-bdaf02311257" style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p data-id="6fef63f1-258f-4aaf-9f36-446760ba9cb6" style="text-align: left;"><strong>Field</strong></p></td><td colspan="1" rowspan="1"><p data-id="488ae2c0-6735-4806-a66c-db2e8ba3237e" style="text-align: left;"><strong>Explanation</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="94ce678c-2826-4832-ae08-66915a7cacae" style="text-align: left;">ActionCode</p></td><td colspan="1" rowspan="1"><p data-id="f8e08811-20c7-4000-848f-fcb4841dc034" style="text-align: left;">Action code applied when processing the subscription.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="8442be80-5d94-4728-96b6-dacb1dfbeb2f" style="text-align: left;">ActionCodeForNewItems</p></td><td colspan="1" rowspan="1"><p data-id="395516bf-fde6-4b52-b6c3-f9eb4dbf32c5" style="text-align: left;">Action code applied to newly added subscription items.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="0c74d03a-977d-4782-b0fd-09e654cb6d60" style="text-align: left;">AddLineWithDisplayName</p></td><td colspan="1" rowspan="1"><p data-id="18a9c773-f1a9-48c0-ae2e-5bf22554fd13" style="text-align: left;">When true, adds a heading line showing the subscription display name.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="a8c29ab3-2633-4bb7-bade-9872106dfa6c" style="text-align: left;">AddLineWithPeriod</p></td><td colspan="1" rowspan="1"><p data-id="cc9442a7-af66-4e7b-b5d8-b2adb2705e43" style="text-align: left;">When true, adds a line showing the billing period.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="a1e60c71-ffcd-4254-911f-ccd05e43d091" style="text-align: left;">AddLineWithSubject</p></td><td colspan="1" rowspan="1"><p data-id="b9bee505-ea78-4c67-92ba-7f1e9e653133" style="text-align: left;">When true, adds a line showing the subject.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="958105f6-1369-4a89-969b-bac490c39e34" style="text-align: left;">CreateAsSalesOrder</p></td><td colspan="1" rowspan="1"><p data-id="e4d810c2-c337-47d1-99b8-5cea8f174f3f" style="text-align: left;">When true, the subscription produces sales orders rather than invoices.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="1cb0822a-50ab-4650-b5ef-8be91982c3df" style="text-align: left;">DisplayName</p></td><td colspan="1" rowspan="1"><p data-id="0d6ed70a-f5f4-4181-9a7e-c9d57fc3bb69" style="text-align: left;">Human-readable name shown for the subscription.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="afab1235-f560-4c2e-bcdd-f1a742ab4c18" style="text-align: left;">GroupInvoiceOrderByCustomer</p></td><td colspan="1" rowspan="1"><p data-id="18f1611c-5ea6-4695-8cb7-8aad5ca1006f" style="text-align: left;">When true, groups the generated invoice orders per customer.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="aadacc12-12e2-4045-a34b-b55eef44b906" style="text-align: left;">InvoiceState</p></td><td colspan="1" rowspan="1"><p data-id="a7a3e6e9-f223-4e60-870e-2b1d067986a6" style="text-align: left;">State assigned to the invoices the subscription creates.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="5d09d57a-d662-4ca0-ad18-2e07ec43a4a9" style="text-align: left;">Period</p></td><td colspan="1" rowspan="1"><p data-id="23ec7b3b-33e4-4e98-a258-b1a464ef8dbc" style="text-align: left;">Billing period that controls how often the subscription runs.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="966546b6-8808-41d8-8342-39924ed35570" style="text-align: left;">PeriodsToIncludeInFirstRun</p></td><td colspan="1" rowspan="1"><p data-id="ca00038b-0293-44ec-a55b-6a5850442e1c" style="text-align: left;">Number of periods to include the first time the subscription runs.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="ce426f8c-b044-4ca0-91ff-199dbf6b095b" style="text-align: left;">SalesOrderState</p></td><td colspan="1" rowspan="1"><p data-id="4941b64d-e01b-4743-a72b-d2284ca230f7" style="text-align: left;">State assigned to the sales orders the subscription creates.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="a34cca81-9ed3-49cb-a191-69d7a56d8eee" style="text-align: left;">StartAt</p></td><td colspan="1" rowspan="1"><p data-id="453ed5bd-52ea-489d-824d-33aea7d69b3c" style="text-align: left;">Date from which the subscription starts running.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="8800ea12-f65d-4b1a-b57e-c86f0f8eb516" style="text-align: left;">SystemName</p></td><td colspan="1" rowspan="1"><p data-id="9dad613a-34a8-4cd3-94f1-67b3cae2ef16" style="text-align: left;">Unique system name that identifies the subscription.</p></td></tr></tbody></table>

### Subscription lines

<table data-id="3cebd340-e8b0-4065-b767-99a631e2e56c" style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p data-id="52c73446-4708-4efc-b3d6-03e484313f6c" style="text-align: left;"><strong>Field</strong></p></td><td colspan="1" rowspan="1"><p data-id="09773f85-610b-4e83-97e4-519421589fc2" style="text-align: left;"><strong>Explanation</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="2c5da50c-883b-4645-bc6d-10f93154471b" style="text-align: left;">DisplayName</p></td><td colspan="1" rowspan="1"><p data-id="ad931f68-cec5-4592-ac57-e9df98d877cc" style="text-align: left;">Display name used for the subscription line.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="2f186ee4-9102-4915-8aa8-a2b4181b34b9" style="text-align: left;">ItemOrder</p></td><td colspan="1" rowspan="1"><p data-id="b676623f-a395-4522-aea5-fc614cec54aa" style="text-align: left;">Sort order of the item within the subscription.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="936a96af-70ca-4b6e-82eb-3875f21824f2" style="text-align: left;">ProductIdentifier</p></td><td colspan="1" rowspan="1"><p data-id="075eeb9c-37cd-4251-890d-e916cce1a4ba" style="text-align: left;">Identifier of the product on the subscription line.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="ebe0b3e9-5bd9-4864-a68a-02b51a18d011" style="text-align: left;">Quantity</p></td><td colspan="1" rowspan="1"><p data-id="f9f64110-93e0-4e19-a16c-34eb122b14b3" style="text-align: left;">Quantity of the product on the subscription line.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="5a8a6a61-dd12-43ac-8d62-221f13d04c48" style="text-align: left;">SubscriptionSystemName</p></td><td colspan="1" rowspan="1"><p data-id="db768996-e8c8-4983-a28b-74e45349fe13" style="text-align: left;">System name of the subscription the item belongs to.</p></td></tr></tbody></table>

### Customer subscriptions

<table data-id="dc44f0e9-2a01-4b96-bbb8-5a77fca1c2a4" style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p data-id="a4916e90-0b45-44c4-8b7a-196caf1ab746" style="text-align: left;"><strong>Field</strong></p></td><td colspan="1" rowspan="1"><p data-id="07485bda-b9ae-4598-9701-b74394f9edc4" style="text-align: left;"><strong>Explanation</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="cbb13a02-7520-4032-be0a-cab7e412b157" style="text-align: left;">CustomerIdentifier</p></td><td colspan="1" rowspan="1"><p data-id="f799929f-cf11-420a-b079-14fc44a3ed94" style="text-align: left;">Identifier of the customer the subscription is assigned to.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="80aad35b-5e2f-4568-affd-b14e720ea202" style="text-align: left;">Discount</p></td><td colspan="1" rowspan="1"><p data-id="7628f576-5507-4cea-acdb-a8be45442fd6" style="text-align: left;">Fixed discount amount applied to the customer subscription.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="ed47d141-c86f-4d81-a0a1-8731df14f580" style="text-align: left;">DiscountPct</p></td><td colspan="1" rowspan="1"><p data-id="77b9ad27-60aa-4db6-91cc-91fdab8085b7" style="text-align: left;">Percentage discount applied to the customer subscription.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="ab7249d0-9b4f-4666-a139-694faf1ec55c" style="text-align: left;">EndAt</p></td><td colspan="1" rowspan="1"><p data-id="dbea5294-54a4-4704-9a94-067feb0fa22a" style="text-align: left;">Date on which the customer subscription ends.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="59783811-a46c-45bf-ba95-edf9728b71d3" style="text-align: left;">ExpiryDate</p></td><td colspan="1" rowspan="1"><p data-id="b6398939-ec7f-41a0-9a41-756a4e1577cb" style="text-align: left;">Date after which the customer subscription expires.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="0d885f43-def1-49ea-aa7b-91cad5375e71" style="text-align: left;">FixedPrice</p></td><td colspan="1" rowspan="1"><p data-id="833884a9-97a8-4d18-8fdf-0badb07a5b3d" style="text-align: left;">Fixed price that overrides the calculated price.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="03086de6-bfff-463b-9cf7-56eb2652d71c" style="text-align: left;">PriceFactor</p></td><td colspan="1" rowspan="1"><p data-id="296f542d-856a-47ab-8ccd-dded992f51b5" style="text-align: left;">Factor that multiplies the price for this customer.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="020800e6-eb97-4312-ab6a-cc78c12928c9" style="text-align: left;">QtyFactor</p></td><td colspan="1" rowspan="1"><p data-id="a106d591-7e84-4fb1-9bc0-b519febb5385" style="text-align: left;">Factor that multiplies the quantity for this customer.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="82d9b526-bebf-449c-853a-a60d3f0a6924" style="text-align: left;">ShouldRunFullPeriod</p></td><td colspan="1" rowspan="1"><p data-id="fc94b0d6-0d91-4b5d-af52-cc80e4050e56" style="text-align: left;">When true, the subscription always bills a full period regardless of start or end dates.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="1a0f5e7d-ab05-42ec-8620-554e9fcb6959" style="text-align: left;">StartAt</p></td><td colspan="1" rowspan="1"><p data-id="b68b805c-45a8-44ea-9ccd-d55d94e95ee7" style="text-align: left;">Date from which the customer subscription is active.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="a03ff227-3928-4c85-a92c-19725a9f383b" style="text-align: left;">Subject</p></td><td colspan="1" rowspan="1"><p data-id="037ac52b-698c-46f7-8166-5441d5f02d4a" style="text-align: left;">Subject used to distinguish this customer subscription.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="e67d5238-86a3-4c24-96f6-4c161c113f60" style="text-align: left;">SubscriptionSystemName</p></td><td colspan="1" rowspan="1"><p data-id="52431090-be9c-421b-9ff4-5861054dab62" style="text-align: left;">System name of the subscription assigned to the customer.</p></td></tr></tbody></table>

* * *

See also the overview [SyncTool – actions](https://support.sapera.io/en/articles/547-synctool-handlinger.md).

* * *

**Want to know more?**

Read more in these related articles:

[

Standard parameters for all actions

The general parameters available on most SyncTool actions: step control, error handling, timeout, etc.

](https://support.sapera.io/en/articles/648.md)
