Transform
Last updated
Last updated
vendor/Transform.js
The Transform utility can be used to define a relationship between objects from different sources. After defining the relationship, utility methods can be used to do things such as convert data from one source to another, allowing users to then post to API endpoints without additional data manipulation.
Returns
Void
Map a payload object to the desired output format based on a mapping array.
Parameters
Name | Type | Description | |
---|---|---|---|
Returns
Void
Convert fields defined in a Transform trigger. This method is called from the Transform trigger scaffolding script.
Parameters
Returns
Void
Proxy for _.set with handling for line_items[].sku not captured in the array logic
Parameters
Returns
Void
For some reason "{{current_item.fields['Option 1']}}" doesn't work but "
{{current_item.fields[key]}}" does... this is a quick way to try to get it kind-of working
Parameters
Returns
string
Name | Type | Description | |
---|---|---|---|
Name | Type | Description | |
---|---|---|---|
Name | Type | Description | |
---|---|---|---|
mapping
array
An array of key / value pair objects containing where key is source, value is destination
.
payload
object
The payload passed into the Task.
context
object
The full context object passed into the Task. We use context.source
, context.trigger.metadata
, and context.trigger.fields
.
payload
object
The payload passed into the Task.
obj
key
string
value
value
string